How to zero a custom field within elf_link_hash_entry

William Tambe tambewilliam@gmail.com
Thu Jun 4 18:05:00 GMT 2020


I am adding a custom field within elf_link_hash_entry that I would like to
be initially null when retrieved within elf_backend_check_relocs().

The backtrace leading to the call of elf_backend_check_relocs() looks as
follow:

(gdb) bt
#0  iron_elf_check_relocs (abfd=0x5555557109e0, info=0x5555556a6680
<link_info>, sec=0x555555729cc8, relocs=0x555555733d98) at
../../iron-toolchain/binutils/bfd/elf32-iron.c:504
#1  0x00005555555d4261 in _bfd_elf_link_check_relocs (abfd=0x5555557109e0,
info=0x5555556a6680 <link_info>) at
../../iron-toolchain/binutils/bfd/elflink.c:3975
#2  0x0000555555588ae3 in lang_check_relocs () at
../../iron-toolchain/binutils/ld/ldlang.c:7762
#3  lang_process () at ../../iron-toolchain/binutils/ld/ldlang.c:7993
#4  0x00005555555756e3 in main (argc=<optimized out>, argv=<optimized out>)
at ../../iron-toolchain/binutils/ld/ldmain.c:444

I am not able to tell which function get called to create each
elf_link_hash_entry; in fact, within that function I would like to insure
that my custom field within elf_link_hash_entry is initialized to null by
the time it is retrieved within  elf_backend_check_relocs().

Any idea which function is responsible for creating each
elf_link_hash_entry when running the linker ?


More information about the Binutils mailing list