Linker problem to create .interp section
Bhushan Verma
bhushan.verma@iap-online.com
Wed Jun 18 11:34:00 GMT 2008
More information about the Binutils mailing list
Wed Jun 18 11:34:00 GMT 2008
- Previous message (by thread): [M32C]: Regarding EM_M32C change
- Next message (by thread): Linker problem to create .interp section
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
I just tried to run a shared object on linux using GNU toolchain.
#gcc -o func.so -shared -fpic -Wl,-e,func -Wl,-I,/lib/ld-linux.so.2 func.c
#./func.so
segmentation fault
# readelf -l func.so
Elf file type is DYN (Shared object file)
Entry point 0x47c
There are 5 program headers, starting at offset 52
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x000000 0x00000000 0x00000000 0x00548 0x00548 R E 0x1000
LOAD 0x000548 0x00001548 0x00001548 0x00104 0x0010c RW 0x1000
DYNAMIC 0x000560 0x00001560 0x00001560 0x000c0 0x000c0 RW 0x4
NOTE 0x0000d4 0x000000d4 0x000000d4 0x00024 0x00024 R 0x4
GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x4
Section to Segment mapping:
Segment Sections...
00 .note.gnu.build-id .gnu.hash .dynsym .dynstr .gnu.version
.gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .eh_frame
01 .ctors .dtors .jcr .data.rel.ro .dynamic .got .got.plt .bss
02 .dynamic
03 .note.gnu.build-id
04
In linker manual following is mentioned.
-I PROGRAM, --dynamic-linker PROGRAM
Set PROGRAM as the dynamic linker to use
Now my question is why linker is not setting the dynamic linker using above
command.
Thanks & Regards,
Bhushan
- Previous message (by thread): [M32C]: Regarding EM_M32C change
- Next message (by thread): Linker problem to create .interp section
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list