Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Jan 2008 14:12:08 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        "M. Warner Losh" <imp@bsdimp.com>
Cc:        jb@freebsd.org, perforce@freebsd.org
Subject:   Re: PERFORCE change 132153 for review
Message-ID:  <200801021412.09276.jhb@freebsd.org>
In-Reply-To: <20080101.120601.106977236.imp@bsdimp.com>
References:  <200712310531.lBV5VvH3092205@repoman.freebsd.org> <20080101.120601.106977236.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 01 January 2008 02:06:01 pm M. Warner Losh wrote:
> In message: <200712310531.lBV5VvH3092205@repoman.freebsd.org>
>             John Birrell <jb@freebsd.org> writes:
> : http://perforce.freebsd.org/chv.cgi?CH=132153
> : 
> : Change 132153 by jb@jb_freebsd1 on 2007/12/31 05:31:02
> : 
> : 	amd64 doesn't seem to have a program header in the kernel modules
> : 	like i386 does. I don't know enough about amd64 to know if that's a
> : 	problem or not. I have a feeling I'm not far off learning that. :-P
> 
> I believe that amd64 is the only one that doesn't...

Currently. :)  amd64 uses the equivalent of a .o for klds whereas other archs 
use the equivalent of a .so.  Hence link_elf.c (shared object for !amd64) and 
link_elf_object.c (handles plain object files).  Other platforms could be 
switched to using plain objects IIRC, they are just using .so for their 
default.

> Warner
> 
> : Affected files ...
> : 
> : .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_module.c#14 
edit
> : 
> : Differences ...
> : 
> : 
==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_module.c#14 
(text) ====
> : 
> : @@ -927,6 +927,7 @@
> :  #if defined(sun)
> :  	dmp->dm_modid = (int)OBJFS_MODID(st.st_ino);
> :  #else
> : +#if defined(__i386__)
> :  	/*
> :  	 * Find the first load section and figure out the relocation
> :  	 * offset for the symbols. The kernel module will not need
> : @@ -939,6 +940,7 @@
> :  		}
> :  	}
> :  #endif
> : +#endif
> 



-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801021412.09276.jhb>