This is the mail archive of the gas2@sourceware.cygnus.com mailing list for the gas2 project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Hi,
Could someone please explain to me that why ld 2.5.0 for elf_i386
still sets the interpreter even if -static is passed to ld?
The function in question is gldelf_i386_before_allocation () in
eelf_i386.c.
# gdb /usr/gnu/i486-linuxelf/bin/ld
(gdb) eelf_i386.c:136
(gdb) r
Starting program: /usr/gnu/i486-linuxelf/bin/ld -m elf_i386 -static /usr/gnu/i486-linuxelf/lib/crt1.o /usr/gnu/i486-linuxelf/lib/crti.o /usr/gnu/i486-linuxelf/lib/crtbegin.o -L/usr/gnu/lib/gcc-lib/i486-linuxelf/2.6.0-941014 -L/usr/gnu/i486-linuxelf/lib tmat.o -lgcc -lc /usr/gnu/i486-linuxelf/lib/crtend.o /usr/gnu/i486-linuxelf/lib/crtn.o -lgcc
Breakpoint 3, gldelf_i386_before_allocation () at eelf_i386.c:136
136 }
(gdb) print *sinterp
$6 = {name = 0x20d90 ".interp", index = 7, next = 0x4e788, flags = 131603,
vma = 0, user_set_vma = false, lma = 0, _cooked_size = 0, _raw_size = 19,
output_offset = 0, output_section = 0x8ef30, alignment_power = 0,
relocation = 0x0, orelocation = 0x0, reloc_count = 0, filepos = 0,
rel_filepos = 0, line_filepos = 0, userdata = 0x0,
contents = 0x31410 "/usr/lib/libc.so.1", lineno = 0x0, lineno_count = 0,
moving_line_filepos = 0, target_index = 0, used_by_bfd = 0x4e6a0,
constructor_chain = 0x0, owner = 0x5bc90, reloc_done = false,
symbol = 0x4e630, symbol_ptr_ptr = 0x4e620, link_order_head = 0x0,
link_order_tail = 0x0}
(gdb) print config
$7 = {specified_data_size = 0, magic_demand_paged = true,
make_executable = true, traditional_format = false, dynamic_link = false,
build_constructors = true, warn_common = false, warn_once = false,
sort_common = false, text_read_only = true, map_filename = 0x0,
map_file = 0x0, stats = false}
The dynamic_link is false. But sinterp is still set. Why?
--
H.J. Lu
NYNEX Science and Technology, Inc. hjl@nynexst.com