[U-Boot] [PATCH] ARMv7: Fix linker errors across toolchain versions

Wolfgang Denk wd at denx.de
Thu Dec 2 08:34:37 CET 2010


Dear Albert ARIBAUD,

In message <4CF743E6.60706 at free.fr> you wrote:
>
> Starting with the fact that the linker issue is only for one board, 
> omap3_evm, I looked up the board-specific code. First thing that I 
> noticed was
> 
> 	static u8 omap3_evm_version;
> 
> I changed this to
> 
> 	static u8 omap3_evm_version = 1;
> 
> so that the static was moved out of BSS and the linker warning 
> disappeared (reminder: v2010.12-rc2, omap3_evm, arm-2010q1).
> 
> Now this is not the first static BSS variable we use in U-Boot, and the 
> others did not cause linker warnings (not *all* the others, at least), 
> so the real cause is yet unknown to me. But that's at least a lead we 
> can follow.

Write access is only in omap3_evm_get_revision() which in turn only
gets called in misc_init_r(), i. e. after relocation.

Read access is only in get_omap3_evm_rev() [which is not called
outside this file and thus should be made static!] which gets called
only in omap3_evm_need_extvbus() which gets acalled only in
musb_platform_init(), i. e. during USB init.

This should be safe.


You could try out what happens if you make get_omap3_evm_rev() static...

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Without followers, evil cannot spread.
	-- Spock, "And The Children Shall Lead", stardate 5029.5


More information about the U-Boot mailing list