[U-Boot] [PATCH RFC] armv7: fixloop: don't fixup if location is NULL
Andreas Bießmann
andreas.devel at googlemail.com
Sat Jan 8 17:51:30 CET 2011
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.
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.
> 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.
regards
Andreas Bießmann
More information about the U-Boot
mailing list