This is the mail archive of the binutils@sourceware.org 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]

ld -Ttext 0x80000 causes segmentation fault


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


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