diff options
author | Ian Lance Taylor <ian@airs.com> | 2010-04-23 04:47:33 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2010-04-23 04:47:33 +0000 |
commit | f6973bdcb778ca7a54817a696cb0c6457f4ae96f (patch) | |
tree | a56937799943c26b2d9ad4273c0617c09f0ae696 /gold/script.h | |
parent | 496ddd4f6aecbfc250072e0e960fbae21fd3f37b (diff) | |
download | gdb-f6973bdcb778ca7a54817a696cb0c6457f4ae96f.zip gdb-f6973bdcb778ca7a54817a696cb0c6457f4ae96f.tar.gz gdb-f6973bdcb778ca7a54817a696cb0c6457f4ae96f.tar.bz2 |
* 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.
Diffstat (limited to 'gold/script.h')
-rw-r--r-- | gold/script.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gold/script.h b/gold/script.h index f4c3f22..3b8cb92 100644 --- a/gold/script.h +++ b/gold/script.h @@ -86,11 +86,14 @@ class Expression // value is defined. If the value is absolute *RESULT_SECTION will // be NULL. Note that the returned value is still an absolute // value; to get a section relative value the caller must subtract - // the section address. + // the section address. If RESULT_ALIGNMENT is not NULL, this sets + // *RESULT_ALIGNMENT to the alignment of the value of that alignment + // is larger than *RESULT_ALIGNMENT; this will only be non-zero if + // this is an ALIGN expression. uint64_t eval_with_dot(const Symbol_table*, const Layout*, bool check_assertions, uint64_t dot_value, Output_section* dot_section, - Output_section** result_section); + Output_section** result_section, uint64_t* result_alignment); // Return the value of an expression which may or may not be // permitted to refer to the dot symbol, depending on @@ -99,7 +102,7 @@ class Expression eval_maybe_dot(const Symbol_table*, const Layout*, bool check_assertions, bool is_dot_available, uint64_t dot_value, Output_section* dot_section, - Output_section** result_section); + Output_section** result_section, uint64_t* result_alignment); // Print the expression to the FILE. This is for debugging. virtual void |