This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
ld -Ttext 0x80000 causes segmentation fault
- From: Jinxin Song <jinxin at kth dot se>
- To: binutils at sourceware dot org
- Date: Thu, 25 Jun 2015 17:27:16 +0100
- Subject: ld -Ttext 0x80000 causes segmentation fault
- Authentication-results: sourceware.org; auth=none
This is probably the same problem with
https://sourceware.org/ml/binutils/2000-07/msg00102.html,
I was trying to locate the text section to a specific address below the
default address 0x08048000,which is the default address on which ld
starts the first PT_LOAD segment on Linux/x86.
What I found out is that when I try address which the last 12bit is
greater or equal than 0x200(e.g.0xXXX200,
0xXXX400,0xXXX500,...,0xXXX900 )the program works without any
problem,but if I try with address where the last 12bit is less than
0x200(e.g. 0xXXX000 or 0xXXX100) the program would produce a
segmentation fault. moreover,if I use the readelf to read the binary, I
find that the paddr of PHDR would be 0 with those segmentation binary.
Could you please give me any explanation of this weird problem?
Song