aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2025-03-10 23:01:54 +1030
committerAlan Modra <amodra@gmail.com>2025-03-10 23:01:54 +1030
commitb8c5ada1742586d389cec1b82f69c895976b1849 (patch)
tree3c24672ff7e18bea809221f1759e5b3f519df73a /gdb
parentce53bc06f64a17cfe2e6c598e47e772f6a29e2f5 (diff)
downloadbinutils-b8c5ada1742586d389cec1b82f69c895976b1849.zip
binutils-b8c5ada1742586d389cec1b82f69c895976b1849.tar.gz
binutils-b8c5ada1742586d389cec1b82f69c895976b1849.tar.bz2
Further tidies to bed->p_align code
align_pagesize was used for two things, reducing p->p_align from maxpagesize to the bed->p_align value (section alignment permitting), and increasing p->p_align above maxpagesize if section alignment required that. This patch untangles those two, making align_pagesize only do the former. p->p_align is set directly for the latter. I've made that change to p->p_align only when D_PAGED to keep things consistent with other early assignments to p->p_align. p->p_align is set later according to section alignment when not D_PAGED. I've also moved the place where align_pagesize adjusts p->p_align to be with other code setting p->p_align. That seemed better to me than leaving it until the last possible moment. Note that it isn't necessary to have this adjustment done inside a test for a PT_LOAD header, since we never set align_pagesize non-zero outside a PT_LOAD test. * elf.c (assign_file_positions_for_load_sections): Clear align_pagesize whenever we have a section alignment more than bed->p_align. Set p->p_align rather than align_pagesize when section alignment exceeds maxpagesize. Assign p->p_align from align_pagesize earlier.
Diffstat (limited to 'gdb')
0 files changed, 0 insertions, 0 deletions