From 4ac3fa49965e32610c7c625b9bdc530fcceb14ea Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Tue, 7 Jul 2020 09:54:09 +0100 Subject: [PATCH] Stop the GOLD linker from complaining about relocations from .gnu.build.attributes sections to discarded code sections. * target-reloc.h (Default_comdat_behaviour:get): Ignore discarded relocs that refer to the .gnu.build.attributes section. --- gold/ChangeLog | 5 +++++ gold/target-reloc.h | 1 + 2 files changed, 6 insertions(+) diff --git a/gold/ChangeLog b/gold/ChangeLog index a988d9ece63..a81fe42f865 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,8 @@ +2020-07-07 Nick Clifton + + * target-reloc.h: (Default_comdat_behaviour:get): Ignore discarded + relocs that refer to the .gnu.build.attributes section. + 2020-07-06 Nick Clifton * po/fr.po: Updated French translation. diff --git a/gold/target-reloc.h b/gold/target-reloc.h index e9e3e5b0027..748886e0ffd 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 + || is_prefix_of (".gnu.build.attributes", name) || strcmp(name, ".gcc_except_table") == 0) return CB_IGNORE; return CB_ERROR; -- 2.30.2