This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
how to add segment at address 0?
- From: Vladimir Kondratiev <vladimir dot kondratiev at intel dot com>
- To: binutils at sources dot redhat dot com
- Date: Tue, 04 Feb 2003 19:17:12 +0200
- Subject: how to add segment at address 0?
Hello,
I need to allocate some data at address 0. Otherwise, it is ordinal "C"
program. All I need is one section starting at address 0.
I tried to tweak LD script to add one more segment. Here I faced with
problem:
I printed "default" LD script using "--verbose" flag and started to
modify it. But, since I need to add segment, I need to use PHDRS. LD
"default" script have no PHDRS directive. On myself, I did not succeeded
to write proper PHDRS and set up sections to use proper segments.
How should I do it? Let's say, I need to write "C" program where section
".zero_based" will start at address 0.
Output format - ELF for Linux on i386.
Regards, Vladimir.
mailto: vladimir.kondratiev @ intel.com