binutils: augment equally-named sections again

Revert GNU ld to the old behavior where sections with the same name in multiple
ld scripts are merged. Binutils 2.36.1 creates two sections with the same name.

Fixes #4126
This commit is contained in:
Sebastian Sumpf 2021-05-07 11:40:01 +02:00 committed by Christian Helmuth
parent fc902d9e66
commit 6639261126
3 changed files with 19 additions and 1 deletions

View File

@ -1 +1 @@
41f7e5a393d8f8b8c7471efc366e74695a8d7694
6c84c45b94d27bedf4b79d37f4703594e74458eb

View File

@ -0,0 +1,17 @@
Revert to old behavior where sections with the same name are augmented
Sebastian Sumpf
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 8cbeda6..10ccc98 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -7414,7 +7414,7 @@ lang_enter_output_section_statement (const char *output_section_statement_name,
lang_output_section_statement_type *os;
os = lang_output_section_statement_lookup (output_section_statement_name,
- constraint, 2);
+ constraint, 1);
current_section = os;
if (os->addr_tree == NULL)

View File

@ -1,3 +1,4 @@
bfd.patch
merge_sections.patch
arm.patch
riscv.patch