Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 225736
b: refs/heads/master
c: ed60453
h: refs/heads/master
v: v3
  • Loading branch information
Rabin Vincent authored and Russell King committed Dec 4, 2010
1 parent 31d7c5a commit f0a588f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cd3478f2bd8f2cec19f9247a8a9cd711cbe37683
refs/heads/master: ed60453fa8f8fc3d034dfdf10371a99cc6905626
1 change: 1 addition & 0 deletions trunk/arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ config ARM
select PERF_USE_VMALLOC
select HAVE_REGS_AND_STACK_ACCESS_API
select HAVE_HW_BREAKPOINT if (PERF_EVENTS && (CPU_V6 || CPU_V7))
select HAVE_C_RECORDMCOUNT
help
The ARM series is a line of low-power-consumption RISC chip designs
licensed by ARM Ltd and targeted at embedded applications and
Expand Down
5 changes: 4 additions & 1 deletion trunk/scripts/recordmcount.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ static void *ehdr_curr; /* current ElfXX_Ehdr * for resource cleanup */
static char gpfx; /* prefix for global symbol name (sometimes '_') */
static struct stat sb; /* Remember .st_size, etc. */
static jmp_buf jmpenv; /* setjmp/longjmp per-file error escape */
static const char *altmcount; /* alternate mcount symbol name */

/* setjmp() return values */
enum {
Expand Down Expand Up @@ -299,7 +300,9 @@ do_file(char const *const fname)
fail_file();
} break;
case EM_386: reltype = R_386_32; break;
case EM_ARM: reltype = R_ARM_ABS32; break;
case EM_ARM: reltype = R_ARM_ABS32;
altmcount = "__gnu_mcount_nc";
break;
case EM_IA_64: reltype = R_IA64_IMM64; gpfx = '_'; break;
case EM_MIPS: /* reltype: e_class */ gpfx = '_'; break;
case EM_PPC: reltype = R_PPC_ADDR32; gpfx = '_'; break;
Expand Down
5 changes: 3 additions & 2 deletions trunk/scripts/recordmcount.h
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,12 @@ static uint_t *sift_rel_mcount(uint_t *mlocp,
Elf_Sym const *const symp =
&sym0[Elf_r_sym(relp)];
char const *symname = &str0[w(symp->st_name)];
char const *mcount = '_' == gpfx ? "_mcount" : "mcount";

if ('.' == symname[0])
++symname; /* ppc64 hack */
if (0 == strcmp((('_' == gpfx) ? "_mcount" : "mcount"),
symname))
if (0 == strcmp(mcount, symname) ||
(altmcount && 0 == strcmp(altmcount, symname)))
mcountsym = Elf_r_sym(relp);
}

Expand Down

0 comments on commit f0a588f

Please sign in to comment.