Loading an elf file
John Reiser
jreiser@bitwagon.com
Fri Apr 9 15:54:00 GMT 2010
> 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)) :
--
More information about the Binutils
mailing list