Commit: Fix GOLD testsuite failures for 2.35 branch
Nick Clifton
nickc@redhat.com
Mon Jul 6 10:22:22 GMT 2020
Hi Guys,
I am applying the patch below to fix some testsuite failures for the
gold linker. I am only applying them on the 2.35 branch as I think
that there are outstanding RFAs for them to be applied to the
mainline.
Cheers
Nick
gold/ChangeLog
2020-07-06 Nick Clifton <nickc@redhat.com>
* target-reloc.h (Default_comdat_behaviour:get): Ignore discarded
relocs that refer to the .gnu.build.attributes section.
* testsuite/script_test_7.sh: Adjust expected address of the .bss
section.
* testsuite/script_test_9.sh: Do not expect the .init section to
immediately follow the .text section in the mapping of sections to
segments.
diff --git a/gold/target-reloc.h b/gold/target-reloc.h
index e9e3e5b002..d1d0e13589 100644
--- a/gold/target-reloc.h
+++ b/gold/target-reloc.h
@@ -136,6 +136,7 @@ class Default_comdat_behavior
if (Layout::is_debug_info_section(name))
return CB_PRETEND;
if (strcmp(name, ".eh_frame") == 0
+ || strncmp(name, ".gnu.build.attributes", 21) == 0
|| strcmp(name, ".gcc_except_table") == 0)
return CB_IGNORE;
return CB_ERROR;
diff --git a/gold/testsuite/script_test_7.sh b/gold/testsuite/script_test_7.sh
index adddf6c34b..091875e384 100755
--- a/gold/testsuite/script_test_7.sh
+++ b/gold/testsuite/script_test_7.sh
@@ -40,4 +40,4 @@ check()
check script_test_7.stdout "\\.interp[ ]*PROGBITS[ ]*0*10000100"
check script_test_7.stdout "\\.data[ ]*PROGBITS[ ]*0*10200000"
-check script_test_7.stdout "\\.bss[ ]*NOBITS[ ]*0*10400..."
+check script_test_7.stdout "\\.bss[ ]*NOBITS[ ]*0*1040...."
diff --git a/gold/testsuite/script_test_9.sh b/gold/testsuite/script_test_9.sh
index 3dcd3c49f3..da75b65c93 100755
--- a/gold/testsuite/script_test_9.sh
+++ b/gold/testsuite/script_test_9.sh
@@ -38,5 +38,6 @@ check()
check script_test_9.stdout "LOAD .*R E "
check script_test_9.stdout "LOAD .*RW "
-check script_test_9.stdout "00 .*\.text .init"
+check script_test_9.stdout "00 .*\.text"
+check script_test_9.stdout "00 .*\.init"
check script_test_9.stdout "01 .*\.data "
More information about the Binutils
mailing list