[U-Boot] [PATCH RFC] armv7: fixloop: don't fixup if location is NULL
Albert ARIBAUD
albert.aribaud at free.fr
Sun Jan 9 10:00:20 CET 2011
Hi Andreas,
Le 08/01/2011 17:51, Andreas Bießmann a écrit :
> Dear Albert ARIBAUD,
>
> Am 08.01.2011 um 13:18 schrieb Albert ARIBAUD:
>
>> Le 08/01/2011 11:49, Albert ARIBAUD a écrit :
>>
>>>> In my investigations for 'NULL fixup' (-> see
>>>> http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/89864/focus=89906)
>>>> pointed out that only symbols in 'absolute fixup' loop could be 'NULL'
>>>> if there is a not aliased/empty weakly linked symbol.
>>
>> BTW: is such a situation normal? IIUC, it means there is a weakly linked symbol without *any* defintion, *and* it is referenced in the code.
>
> Yes you may have a weakly linked symbol which was declared but nowhere
> implemented. See http://patchwork.ozlabs.org/patch/73647, this fixed such
> a situation for arm920t/at91 style SoC.
Not sure I follow you there. The example you give has a definition,
admittedly for an empty function, right above the weak definition. My
question is about cases where the weak symbol is declared and has no
definition at all. Were you meaning to give an example of an undefined
weak symbol being fixed so that it has at least a default definition?
> BTW: Without the mentioned patch there was another issue with linking
> (-> see http://patchwork.ozlabs.org/patch/73563). The linker introduced
> a .plt section which could not be placed and lead to a segfault of linker.
That's more of a linker bug to me. The plt sections are unused that I
know of. They could probably be put after BSS and marked NOLOAD --
giving it a try would be a nice thing.
>> Granted, maybe it is checked before it is referenced, but we may want to
>> check for and report at build time if possible. Would that be useful?
>
> AFAIR there was a statement to remove those 'undefined weakly linked symbols'
> from code. So it would be useful to have a tool to detect those symbols at build
> time.
I'll have a look at what can be done.
> regards
>
> Andreas Bießmann
Amicalement,
--
Albert.
More information about the U-Boot
mailing list