summaryrefslogtreecommitdiffstats
path: root/gold/testsuite/script_test_3.sh
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2010-04-23 04:47:33 +0000
committerIan Lance Taylor <ian@airs.com>2010-04-23 04:47:33 +0000
commitf6973bdcb778ca7a54817a696cb0c6457f4ae96f (patch)
treea56937799943c26b2d9ad4273c0617c09f0ae696 /gold/testsuite/script_test_3.sh
parent496ddd4f6aecbfc250072e0e960fbae21fd3f37b (diff)
downloadppe42-binutils-f6973bdcb778ca7a54817a696cb0c6457f4ae96f.tar.gz
ppe42-binutils-f6973bdcb778ca7a54817a696cb0c6457f4ae96f.zip
* 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/testsuite/script_test_3.sh')
-rwxr-xr-xgold/testsuite/script_test_3.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/gold/testsuite/script_test_3.sh b/gold/testsuite/script_test_3.sh
index cddb69accf..d114edd180 100755
--- a/gold/testsuite/script_test_3.sh
+++ b/gold/testsuite/script_test_3.sh
@@ -85,4 +85,18 @@ if test "$section_size" != "$segment_size"; then
exit 1
fi
+# At least one PT_LOAD segment should have an alignment >= 0x100000.
+found=no
+for a in `grep LOAD script_test_3.stdout | sed -e 's/^.* 0x/0x/'`; do
+ script="BEGIN { if ($a >= 0x100000) { print \"true\" } else { print \"false\" } }"
+ x=`awk "$script" < /dev/null`
+ if test "$x" = "true"; then
+ found=yes
+ fi
+done
+if test "$found" = "no"; then
+ echo "no LOAD segment has required alignment"
+ exit 1
+fi
+
exit 0
OpenPOWER on IntegriCloud