* expression.cc (Expression::Expression_eval_info): Add
result_alignment_pointer field. (Expression::eval_with_dot): Add result_alignment_pointer parameter. Change all callers. (Expression::eval_maybe_dot): Likewise. (class Binary_expression): Add alignment_pointer parameter to left_value and right_value. Change all callers. (BINARY_EXPRESSION): Set result alignment. (class Trinary_expression): Add alignment_pointer parameter to arg2_value and arg3_value. Change all callers. (Trinary_cond::value): Set result alignment. (Max_expression::value, Min_expression::value): Likewise. (Align_expression::value): Likewise. * script-sections.cc (class Sections_element): Add dot_alignment parameter to set_section_addresses virtual function. Update instantiations. (class Output_section_element): Likewise. (Script_sections::create_segments): Add dot_alignment parameter. Change all callers. (Script_sections::create_segments_from_phdrs_clause): Likewise. (Script_sections::set_phdrs_clause_addresses): Likewise. * script-sections.h: Update declarations. * script.h: Update declarations. * output.h (Output_segment::set_minimum_p_align): Don't decrease min_p_align. * testsuite/script_test_3.t: Set large alignment. * testsuite/script_test_3.sh: Make sure that at least one LOAD segment has expected alignment.
This commit is contained in:
parent
496ddd4f6a
commit
f6973bdcb7
9 changed files with 208 additions and 73 deletions
|
@ -232,7 +232,7 @@ class Script_sections
|
|||
|
||||
// Create segments.
|
||||
Output_segment*
|
||||
create_segments(Layout*);
|
||||
create_segments(Layout*, uint64_t);
|
||||
|
||||
// Create PT_NOTE and PT_TLS segments.
|
||||
void
|
||||
|
@ -253,7 +253,7 @@ class Script_sections
|
|||
|
||||
// Create the segments from a PHDRS clause.
|
||||
Output_segment*
|
||||
create_segments_from_phdrs_clause(Layout* layout);
|
||||
create_segments_from_phdrs_clause(Layout* layout, uint64_t);
|
||||
|
||||
// Attach sections to segments from a PHDRS clause.
|
||||
void
|
||||
|
@ -261,7 +261,7 @@ class Script_sections
|
|||
|
||||
// Set addresses of segments from a PHDRS clause.
|
||||
Output_segment*
|
||||
set_phdrs_clause_addresses(Layout*);
|
||||
set_phdrs_clause_addresses(Layout*, uint64_t);
|
||||
|
||||
// True if we ever saw a SECTIONS clause.
|
||||
bool saw_sections_clause_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue