aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-ppc.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-07-24 15:34:55 +0930
committerAlan Modra <amodra@gmail.com>2021-07-24 17:59:52 +0930
commitc09c8b42021180eee9495bd50d8b35e683d3901b (patch)
tree84452244c58664fa946c9d820d14a6de9279e7b7 /bfd/elf32-ppc.c
parent553dd76c7e49e3e6afb528ff865589da8f6f3e1c (diff)
downloadgdb-c09c8b42021180eee9495bd50d8b35e683d3901b.zip
gdb-c09c8b42021180eee9495bd50d8b35e683d3901b.tar.gz
gdb-c09c8b42021180eee9495bd50d8b35e683d3901b.tar.bz2
Revert: PowerPC: Don't generate unused section symbols
Blindly following x86 broke linux kernel builds. bfd/ * elf32-ppc.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define as true. * elf64-ppc.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Likewise. gas/ * testsuite/gas/ppc/power4.d: Adjust for section sym change. * testsuite/gas/ppc/test1elf32.d: Likewise. * testsuite/gas/ppc/test1elf64.d: Likewise. ld/ * testsuite/ld-powerpc/tlsexe.r: Adjust for section sym change. * testsuite/ld-powerpc/tlsexe32.r: Likewise. * testsuite/ld-powerpc/tlsexe32no.r: Likewise. * testsuite/ld-powerpc/tlsexeno.r: Likewise. * testsuite/ld-powerpc/tlsexenors.r: Likewise. * testsuite/ld-powerpc/tlsexers.r: Likewise. * testsuite/ld-powerpc/tlsexetoc.r: Likewise. * testsuite/ld-powerpc/tlsexetocrs.r: Likewise. * testsuite/ld-powerpc/tlsget.d: Likewise. * testsuite/ld-powerpc/tlsget.wf: Likewise. * testsuite/ld-powerpc/tlsget2.d: Likewise. * testsuite/ld-powerpc/tlsget2.wf: Likewise. * testsuite/ld-powerpc/tlsso.r: Likewise. * testsuite/ld-powerpc/tlsso32.r: Likewise. * testsuite/ld-powerpc/tlstocso.r: Likewise.
Diffstat (limited to 'bfd/elf32-ppc.c')
-rw-r--r--bfd/elf32-ppc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 34a6b3f..93fbadf 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -19,8 +19,10 @@
Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
Boston, MA 02110-1301, USA. */
-/* Don't generate unused section symbols. */
-#define TARGET_KEEP_UNUSED_SECTION_SYMBOLS false
+/* The assembler should generate a full set of section symbols even
+ when they appear unused. The linux kernel build tool recordmcount
+ needs them. */
+#define TARGET_KEEP_UNUSED_SECTION_SYMBOLS true
#include "sysdep.h"
#include <stdarg.h>