[gold patch] Fix gold to match .data.rel.ro sections more carefully

Cary Coutant ccoutant@google.com
Wed May 23 19:06:00 GMT 2012

This patch fixes gold, which has the same problem placing
.data.rel.rome (for example) in the .data.rel.ro section.

Tested on x86_64.

OK to commit?


2012-05-23  Cary Coutant  <ccoutant@google.com>

	* layout.cc (Layout::section_name_mapping): Match .data.rel.ro.*
	more carefully.

commit 4055988862278017c0564c81e8cee7fd001e6507
Author: Cary Coutant <ccoutant@google.com>
Date:   Wed May 23 11:44:38 2012 -0700

    Fix handling of .data.rel.ro* vs. .data.rel.ro.* sections.

diff --git a/gold/layout.cc b/gold/layout.cc
index 0ac0fbf..e9aeef5 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
@@ -4573,8 +4573,8 @@ const Layout::Section_name_mapping
Layout::section_name_mapping[] =
   MAPPING_INIT(".text.", ".text"),
   MAPPING_INIT(".rodata.", ".rodata"),
-  MAPPING_INIT(".data.rel.ro.local", ".data.rel.ro.local"),
-  MAPPING_INIT(".data.rel.ro", ".data.rel.ro"),
+  MAPPING_INIT(".data.rel.ro.local.", ".data.rel.ro.local"),
+  MAPPING_INIT(".data.rel.ro.", ".data.rel.ro"),
   MAPPING_INIT(".data.", ".data"),
   MAPPING_INIT(".bss.", ".bss"),
   MAPPING_INIT(".tdata.", ".tdata"),

More information about the Binutils mailing list