This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Loading an elf file
Here's an excerpt from the linker script we use, could you please
comment on what's missing?
On a machine such as i686 or x86_64, run "ld -verbose" to see a default
linker script. Pay attention to ALIGN commands and other expressions
involving ". &", such as these and others:
/* Adjust the address for the data segment. We want to adjust up to
the same address within the page on the next page up. */
. = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & (CONSTANT (MAXPAGESIZE) - 1));
. = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
.sharable_data : ALIGN(CONSTANT (MAXPAGESIZE))
.lrodata ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)) :
--