Fix for local symbols appearing in CONFIG_KALLSYMS traces
One of the problems with KALLSYMS on parisc is that our toolchain generates lots of local symbols with names like .LNNN and .LCNNN which are multiply defined and thus spoil symbolic backtraces.
I suspect the true fix is probably to force the parisc binutils to give them empty names when it emits elf object, but until binutils does this, the attached patch eliminates them from the kernel object and from loaded objects.
The patch is fairly awful, particularly the messing with the contents of a pointer to a constant area in module_finalize, but it does eliminate the problem.
Would this be OK to people until binutils sorts out the problem for us?
James
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.1466 -> 1.1467
# arch/parisc/Makefile 1.20 -> 1.21
# arch/parisc/kernel/module.c 1.5 -> 1.6
# (new) -> 1.1 arch/parisc/nm
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/06/27 [email protected] 1.1467
# Fix parisc local symbol problem with CONFIG_KALLSYMS
# --------------------------------------------
#
arch/parisc/Makefile +1 -1
@@ -16,7 +16,7 @@ # Modified for PA-RISC Linux by Paul Lahaie, Alex deVries, # Mike Shaver, Helge Deller and Martin K. Petersen # - +NM = sh arch/parisc/nm ifdef CONFIG_PARISC64 CROSS_COMPILE := hppa64-linux- UTS_MACHINE := parisc64
arch/parisc/kernel/module.c +48 -1
61 lines not on this page · raw message
arch/parisc/nm new file +6 -0
@@ -0,0 +1,6 @@ +#!/bin/sh +## +# Hack to have an nm which removes the local symbols. We also rely +# on this nm being hidden out of the ordinarily executable path +## +${CROSS_COMPILE}nm $* | grep -v '.LC*[0-9]*$'