This is the mail archive of the binutils@sources.redhat.com 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]

IA64 symbol addresses always 0?


Hi,

I there a reason that symbol addresses are set to zero on IA64?

For example:
Symbol table '.dynsym' contains 3 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
     1: 0000000000000000   784 FUNC    GLOBAL DEFAULT  UND puts@GLIBC_2.2 (2)
     2: 0000000000000000   544 FUNC    GLOBAL DEFAULT  UND __libc_start_main@GLIBC_2.2 (2)

Relocation section '.rela.IA_64.pltoff' at offset 0x2c0 contains 2 entries:
  Offset          Info           Type           Sym. Value    Sym. Name + Addend
6000000000000ce0  000100000081 R_IA64_IPLTLSB    0000000000000000 puts + 0

Shouldn't the symbol value be the PLT entry for the relocation?

This meshes with what I understand of 386 behaviour, where an
R_I386_JUMP_SLOT gives it's value as the PLT entry if I haven't
misunderstood:

--- e.g. ---
Symbol table '.dynsym' contains 5 entries:
   Num:    Value  Size Type    Bind   Vis      Ndx Name
...
     2: 08048288    57 FUNC    GLOBAL DEFAULT  UND printf@GLIBC_2.0 (2)

Relocation section '.rel.plt' at offset 0x240 contains 2 entries:
 Offset     Info    Type            Sym.Value  Sym. Name
...
080495a8  00000207 R_386_JUMP_SLOT   08048288   printf

disassembling gives:
8048288:       ff 25 a8 95 04 08       jmp    *0x80495a8  <-- i.e. jumping to PLT fixup code or whatever.
--- end e.g. ---

I noticed because I want something like ltrace for IA64.  ltrace on
i386 takes a hash of symbols and their values and uses it for setting
breakpoints.  

Oh the toolchain i'm using on ia64 is 
gcc version 3.3.2 (Debian)
GNU assembler version 2.14.90.0.7 (ia64-linux) using BFD version
2.14.90.0.7 20031029 Debian GNU/Linux

-i
ianw@gelato.unsw.edu.au
http://www.gelato.unsw.edu.au


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