kernel-ark/scripts
Steven Rostedt 3f6e968ef4 tracing: do not use functions starting with .L in recordmcount.pl
On Wed, 5 Aug 2009, Ingo Molnar wrote:
> * Dave Airlie <airlied@gmail.com> wrote:
>
> > Hey,
> >
> > So I spent 3-4 hrs today (I'm stupid yes) tracking down a .o
> > breakage by blaming rawhide gcc/binutils as I was using make
> > V=1and seeing only the compiler chain running,
>
> Hm, is this that powerpc related build bug you just reported?

Well we tracked it down and it is powerpc64 specific.

Seems that in drivers/hwmon/lm93.c there's a function called:

   LM93_IN_FROM_REG()

But PPC64 has function descriptors and the real function names (the ones
you see in objdump) start with a '.'. Thus this in objdump you have:

 Disassembly of section .text:

 0000000000000000 <.LM93_IN_FROM_REG>:
       0:       7c 08 02 a6     mflr    r0
       4:       fb 81 ff e0     std     r28,-32(r1)

The function name used is .LM93_IN_FROM_REG. But gcc considers symbols
that start with ".L" as a special symbol that is used inside the assembly
stage.

The nm passed into recordmcount uses the --synthetic option which shows
the ".L" symbols (my runs outside of the build did not include the
--synthetic option, so my older patch worked). We see the function as a
local.

Now to capture all the locations that use "mcount" we need to have a
reference to link into the object file a list of mcount callers. We need a
reference that will not disappear. We try to use a global function and if
that does not work, we use a local function as a reference. But to relink
the section back into the object, we need to make it global. In this case,
we run objcopy using --globalize-symbol and --localize-symbol to convert
the symbol into a global symbol, link the mcount list, then convert it
back to a local symbol.

This works great except for this case. .L* symbols can not be converted
into a global symbol, and the mcount section referencing it will remain
unresolved.

Reported-by: Dave Airlie <airlied@gmail.com>
LKML-Reference: <alpine.DEB.2.00.0908052011590.5010@gandalf.stny.rr.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2009-08-05 22:45:07 -04:00
..
basic kbuild: fix build error during make htmldocs 2009-06-20 13:31:28 +02:00
dtc powerpc: Have git ignore generated files from dtc compile 2009-06-26 14:37:23 +10:00
genksyms Revert "kbuild: strip generated symbols from *.ko" 2009-01-14 21:38:20 +01:00
kconfig kconfig: initialize the screen before using curses(3) functions 2009-07-17 23:06:08 +02:00
ksymoops
mod Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next 2009-06-14 14:12:18 -07:00
package kbuild, deb-pkg: fix install scripts for posix sh 2009-07-17 23:02:57 +02:00
rt-tester
selinux
tracing debugfs: Fix terminology inconsistency of dir name to mount debugfs filesystem. 2009-06-15 21:30:28 -07:00
.gitignore gitignore: ignore scripts/ihex2fw 2009-06-27 00:17:48 +02:00
bin2c.c
binoffset.c
bloat-o-meter
bootgraph.pl bootgraph: fix for use with dot symbols 2009-02-15 12:50:08 +01:00
checkincludes.pl
checkkconfigsymbols.sh
checkpatch.pl checkpatch: version 0.28 2009-02-27 16:26:22 -08:00
checkstack.pl
checksyscalls.sh asm-generic: add a generic unistd.h 2009-06-11 21:02:16 +02:00
checkversion.pl
cleanfile
cleanpatch
config kbuild: add generic --set-str option to scripts/config 2009-06-14 22:48:08 +02:00
conmakehash.c
decodecode
diffconfig
export_report.pl
extract-ikconfig
gcc-version.sh Remove bashisms from scripts 2009-06-09 22:37:54 +02:00
gcc-x86_32-has-stack-protector.sh stackprotector: fix multi-word cross-builds 2009-02-11 12:17:29 +01:00
gcc-x86_64-has-stack-protector.sh stackprotector: fix multi-word cross-builds 2009-02-11 12:17:29 +01:00
gen_initramfs_list.sh kbuild: fix spurious initramfs rebuild 2009-04-11 08:18:12 +02:00
get_maintainer.pl scripts/get_maintainer.pl: change "die" to "warn" when command line file is not a patch 2009-06-16 19:47:54 -07:00
gfp-translate mm: add a gfp-translate script to help understand page allocation failure reports 2009-06-16 19:47:44 -07:00
headerdep.pl kbuild: fix option processing for -I in headerdep 2009-04-11 08:18:07 +02:00
headers_check.pl kbuild/headers_check: refine extern check 2009-06-09 22:37:56 +02:00
headers_install.pl
headers.sh kbuild: clean up scripts/headers.sh 2009-06-09 22:37:43 +02:00
kallsyms.c kallsyms: fix inverted valid symbol checking 2009-06-20 13:33:23 +02:00
Kbuild.include
kernel-doc kernel-doc: move ignoring kmemcheck 2009-07-01 11:26:40 -07:00
Lindent
Makefile Move dtc and libfdt sources from arch/powerpc/boot to scripts/dtc 2009-05-02 16:52:26 -07:00
Makefile.build kbuild: introduce subdir-ccflags-y 2009-04-19 11:12:12 +02:00
Makefile.clean
Makefile.fwinst
Makefile.headersinst kbuild: fix "Argument list too long" error for "make headers_check", 2009-06-09 22:37:56 +02:00
Makefile.host
Makefile.lib gcov: add gcov profiling infrastructure 2009-06-18 13:03:57 -07:00
Makefile.modinst Revert "kbuild: strip generated symbols from *.ko" 2009-01-14 21:38:20 +01:00
Makefile.modpost
makelst
markup_oops.pl scripts: add x86 64 bit support to the markup_oops.pl script 2009-02-15 12:50:10 +01:00
mkcompile_h
mkmakefile
mksysmap Revert "kbuild: strip generated symbols from *.ko" 2009-01-14 21:38:20 +01:00
mkuboot.sh
mkversion
namespace.pl
patch-kernel
pnmtologo.c fbdev: work around old compiler bug 2009-06-30 18:55:59 -07:00
profile2linkerlist.pl
recordmcount.pl tracing: do not use functions starting with .L in recordmcount.pl 2009-08-05 22:45:07 -04:00
setlocalversion kbuild: fix delay in setlocalversion on readonly source 2009-06-14 22:26:00 +02:00
show_delta
tags.sh kbuild: remove a tag file before it is regenerated 2009-05-01 10:54:02 +02:00
unifdef.c kbuild: fix headers_exports with boolean expression 2009-06-09 22:37:57 +02:00
ver_linux Remove bashisms from scripts 2009-06-09 22:37:54 +02:00