This is the mail archive of the binutils@sources.redhat.com 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]

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


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