Weak def test fails on ARM

Daniel Jacobowitz drow@false.org
Mon Jul 30 14:29:00 GMT 2007


The new weak dynamic symbol test fails on ARM, like this:

% /scratch/dan/obj/ld/ld-new -o tmpdir/libweakdyn1b.so \
  -L/scratch/dan/binutils-mainline/ld/testsuite/ld-elf -shared \
  tmpdir/libweakdyn1a.so -Tweak-dyn-1.ld tmpdir/weak-dyn-1b.o

/scratch/dan/obj/ld/ld-new: warning: type and size of dynamic symbol `__data_start' are not defined

And the resulting shared library looks like this:

Symbol table '.dynsym' contains 5 entries:
   Num:    Value  Size Type    Bind   Vis      Ndx Name
     0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND
     1: 00800000     0 SECTION LOCAL  DEFAULT    4
     2: 00000000     1 OBJECT  GLOBAL DEFAULT  UND foo
     3: 00800000     1 OBJECT  GLOBAL DEFAULT  ABS bar
     4: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND __data_start

The symbol comes from libweakdyn1a.so, in which __data_start is
defined at the start of .data (this comes from the ARM linker scripts)
and foo is a weakdef also at the start of .data.

Should __data_start be a hidden symbol to prevent it from becoming
.dynamic (and would that even work)?  What about the other script
defined symbols like __bss_start, which are absolute symbols?

And should we not be picking NOTYPE symbols as aliases?

-- 
Daniel Jacobowitz
CodeSourcery



More information about the Binutils mailing list