From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Schwierzeck Date: Mon, 15 Oct 2012 04:04:36 +0200 Subject: [U-Boot] [PATCH 1/6 V3] common: Add symbol handling for generic lists into Makefile In-Reply-To: <201210150349.25232.marex@denx.de> References: <1349568385-27173-1-git-send-email-marex@denx.de> <1350073626-17024-2-git-send-email-marex@denx.de> <201210150349.25232.marex@denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 2012/10/15 Marek Vasut : >> > 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