This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Question about elf data segment address adjustment
- From: Douglas B Rupp <rupp at adacore dot com>
- To: binutils at sourceware dot org
- Date: Wed, 18 Oct 2017 19:26:59 +0200
- Subject: Question about elf data segment address adjustment
- Authentication-results: sourceware.org; auth=none
In ld/scripttempl/elf.sc about line 562 there's a comment that pre-dates
the 1999 sourceware import, so I can't track it down.
The adjustment described by the comment sometimes leads to an attempted
out of range load of a system global variable.
The comment is:
/* Adjust the address for the data segment. We want to adjust up to
the same address within the page on the next page up. */
What is the reason for this adjustment to the data segment starting
address? Why not, for example, adjust up to the next multiple of 0x10000?
--Douglas Rupp
AdaCore