[U-Boot] [PATCH 1/6 V3] common: Add symbol handling for generic lists into Makefile

Daniel Schwierzeck daniel.schwierzeck at gmail.com
Mon Oct 15 04:04:36 CEST 2012


2012/10/15 Marek Vasut <marex at denx.de>:
>> >  GEN_UBOOT = \
>> >
>> >                 UNDEF_SYM=`$(OBJDUMP) -x $(LIBBOARD) $(LIBS) | \
>> >                 sed  -n -e
>> >                 's/.*\($(SYM_PREFIX)__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`
>> >                 ;\
>> >
>> > -               cd $(LNDIR) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F))
>> > $$UNDEF_SYM $(__OBJS) \ +               UNDEF_LST=`$(OBJDUMP) -x
>> > $(LIBBOARD) $(LIBS) | \ +               sed  -n -e
>> > 's/.*\($(SYM_PREFIX)__u_boot_list_.*\)/-u\1/p'|sort|uniq`;\
>>
>> this must be:
>> > +               sed  -n -e
>> > 's/.*\($(SYM_PREFIX)_u_boot_list_.*\)/-u\1/p'|sort|uniq`;\
>
> I suspect this might break blackfin.

no it is already broken without this change. I also tested Blackfin
but forgot it to mention.
Blackfin explicitely sets SYM_PREFIX:=_ so you will finally get
__u_boot_list_.*.

>
>> otherwise $UNDEF_LST is always empty which breaks at least all MIPS
>> boards because
>> all _uboot_list_* symbols are discarded by the linker. I noticed that
>> on ARM and PowerPC
>> the content of $UNDEF_LST does not matter at all because those symbols
>> are always linked into the final binary.
>
> About time to fix mips ... or throw it away altogether, until it learns to do
> stuff right (incl. relocation).

it's not only MIPS, Blackfin has the same problem. Propably other
'exotic' archs too ;)

-- 
Best regards,
Daniel


More information about the U-Boot mailing list