Sam Ravnborg wrote:
> On Mon, May 05, 2008 at 05:24:04PM +0200, Peter Oberparleiter wrote:
>> From: Peter Oberparleiter <[EMAIL PROTECTED]>
>> +#define CONSTRUCTORS                                                        
>> \
>> +            __CTOR_LIST__ = .;                                      \
>> +            *(.ctors)                                               \
>> +            __CTOR_END__ = .;                                       \
>> +            __DTOR_LIST__ = .;                                      \
>> +            *(.dtors)                                               \
>> +            __DTOR_END__ = .;
> 
> You shall use:  VMLINUX_SYMBOL() here.

Ok, will do.

> And why those SHOUTING names?
> All other linker symbols are lowercase.

Here's the background for that: currently, almost all
arch/*/vmlinux.lds.S scripts contain reference to a CONSTRUCTORS
sections which is (as of yet) empty. The info pages for ld contain
a description of the contents of this section (section 3.6.6 Output
Section Keywords), including the following sample linker script:

                __CTOR_LIST__ = .;
                LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
                *(.ctors)
                LONG(0)
                __CTOR_END__ = .;
                __DTOR_LIST__ = .;
                LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
                *(.dtors)
                LONG(0)
                __DTOR_END__ = .;

Apparently this sample script is buggy (namely the divide by 4 bit on
64 bit systems) so I changed it into the version found in the patch.
This is somewhat of a trade-off between the information which
should be present in a CONSTRUCTORS section according to the info
page and what really is needed to implement constructor support.

I guess changing the names would be an option if required, as well
as dropping the (unused) destructor bit of the linker script.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to