Skip to contentSkip to conversation

perf tools: validate kcore module addresses

PATCH Arnaldo Carvalho de Melo 1 participant 2 messages Oct 11, 2013

lore
Share & tools
lore
#0 lore raw

Em Wed, Oct 09, 2013 at 03:01:11PM +0300, Adrian Hunter escreveu:

Review

Quoted 5 lines
(quoted diff) +3 -2
-static bool kcore_filename_from_kallsyms_filename(char *kcore_filename,
-						  const char *kallsyms_filename)
+static bool filename_from_kallsyms_filename(char *filename,
+					    const char *basename,
+					    const char *kallsyms_filename)

In Fedora12:

CC /tmp/build/perf/util/symbol.o
cc1: warnings being treated as errors
util/symbol.c: In function ‘filename_from_kallsyms_filename’:
util/symbol.c:937: error: declaration of ‘__xpg_basename’ shadows a global declaration
/usr/include/libgen.h:35: error: shadowed declaration is here make[1]: *** [/tmp/build/perf/util/symbol.o] Error 1
make: *** [install] Error 2
make: Leaving directory `/home/acme/git/linux/tools/perf' [acme@fedora12 linux]$

Fixing it up renaming it to base_name,

Oops, one more:

CC /tmp/build/perf/util/symbol-elf.o
cc1: warnings being treated as errors
util/symbol-elf.c: In function ‘kcore__add_phdr’:
util/symbol-elf.c:1167: error: declaration of ‘index’ shadows a global declaration
/usr/include/string.h:487: error: shadowed declaration is here util/symbol-elf.c: In function ‘kcore_extract__create’:
util/symbol-elf.c:1202: error: declaration of ‘index’ shadows a global declaration
/usr/include/string.h:487: error: shadowed declaration is here make[1]: *** [/tmp/build/perf/util/symbol-elf.o] Error 1
make: *** [install] Error 2
make: Leaving directory `/home/acme/git/linux/tools/perf' [acme@fedora12 linux]$

Will switch to 'idx'.

- Arnaldo

----- End forwarded message -----

#1 lore raw

One more, looking into it...

CC /tmp/build/perf/util/symbol-elf.o
cc1: warnings being treated as errors
util/symbol-elf.c: In function ‘copy_bytes’:
util/symbol-elf.c:1021: error: not protecting local variables: variable length buffer
make[1]: *** [/tmp/build/perf/util/symbol-elf.o] Error 1
make: *** [install] Error 2
make: Leaving directory `/home/acme/git/linux/tools/perf' [acme@fedora12 linux]$