This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Weak def test fails on ARM


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]