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

Wolfgang Denk wd at denx.de
Thu Dec 2 09:56:34 CET 2010


Dear Albert ARIBAUD,

In message <4CF7583C.7000001 at free.fr> you wrote:
>
> > Does it help when you change the "*(.bss)" in
> > "arch/arm/cpu/armv7/u-boot.lds"  into "*(.*bss)"
> > (so it also includes any .sbss objects) ?
> 
> No change.

Hm... Maybe it is indeed not a good idea to mix short objects with
those requiring larger alignments - we might lose space at best, or
case misaligned variables?  Eventually it's better to explicitly write

	*(.bss*)
	*(.sbss*)

as we have it in many PowerPC linker scripts (but I have to admit that
I don't know if this is really needed - I don't see any .sbss anywhere
in this build (I do see them in some objects for PowerPC). For
example:

PowerPC:

-> readelf -S common/dlmalloc.o | grep bss
  [ 3] .bss              NOBITS          00000000 000034 000000 00  WA  0   0  1
  [36] .bss.n_mmaps_max  NOBITS          00000000 002728 000004 00  WA  0   0  4
  [37] .sbss.mem_malloc_ NOBITS          00000000 002728 000004 00  WA  0   0  4
  [38] .bss.max_total_me NOBITS          00000000 002728 000004 00  WA  0   0  4
  [40] .bss.max_sbrked_m NOBITS          00000000 00272c 000004 00  WA  0   0  4
  [43] .bss.top_pad      NOBITS          00000000 002734 000004 00  WA  0   0  4
  [44] .sbss.mem_malloc_ NOBITS          00000000 002734 000004 00  WA  0   0  4
  [45] .sbss.mem_malloc_ NOBITS          00000000 002734 000004 00  WA  0   0  4
  [46] .bss.current_mall NOBITS          00000000 002734 000028 00  WA  0   0  4

ARM:

-> readelf -S common/dlmalloc.o | grep bss
  [ 5] .bss              NOBITS          00000000 0015e0 000044 00  WA  0   0  4



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
I've got a bad feeling about this.


More information about the U-Boot mailing list