diff options
Diffstat (limited to 'scripts/recordmcount.c')
| -rw-r--r-- | scripts/recordmcount.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/recordmcount.c b/scripts/recordmcount.c index ee52cb8e17ad..9c22317778eb 100644 --- a/scripts/recordmcount.c +++ b/scripts/recordmcount.c | |||
| @@ -33,6 +33,13 @@ | |||
| 33 | #include <string.h> | 33 | #include <string.h> |
| 34 | #include <unistd.h> | 34 | #include <unistd.h> |
| 35 | 35 | ||
| 36 | #ifndef EM_METAG | ||
| 37 | /* Remove this when these make it to the standard system elf.h. */ | ||
| 38 | #define EM_METAG 174 | ||
| 39 | #define R_METAG_ADDR32 2 | ||
| 40 | #define R_METAG_NONE 3 | ||
| 41 | #endif | ||
| 42 | |||
| 36 | static int fd_map; /* File descriptor for file being modified. */ | 43 | static int fd_map; /* File descriptor for file being modified. */ |
| 37 | static int mmap_failed; /* Boolean flag. */ | 44 | static int mmap_failed; /* Boolean flag. */ |
| 38 | static void *ehdr_curr; /* current ElfXX_Ehdr * for resource cleanup */ | 45 | static void *ehdr_curr; /* current ElfXX_Ehdr * for resource cleanup */ |
| @@ -341,6 +348,12 @@ do_file(char const *const fname) | |||
| 341 | altmcount = "__gnu_mcount_nc"; | 348 | altmcount = "__gnu_mcount_nc"; |
| 342 | break; | 349 | break; |
| 343 | case EM_IA_64: reltype = R_IA64_IMM64; gpfx = '_'; break; | 350 | case EM_IA_64: reltype = R_IA64_IMM64; gpfx = '_'; break; |
| 351 | case EM_METAG: reltype = R_METAG_ADDR32; | ||
| 352 | altmcount = "_mcount_wrapper"; | ||
| 353 | rel_type_nop = R_METAG_NONE; | ||
| 354 | /* We happen to have the same requirement as MIPS */ | ||
| 355 | is_fake_mcount32 = MIPS32_is_fake_mcount; | ||
| 356 | break; | ||
| 344 | case EM_MIPS: /* reltype: e_class */ gpfx = '_'; break; | 357 | case EM_MIPS: /* reltype: e_class */ gpfx = '_'; break; |
| 345 | case EM_PPC: reltype = R_PPC_ADDR32; gpfx = '_'; break; | 358 | case EM_PPC: reltype = R_PPC_ADDR32; gpfx = '_'; break; |
| 346 | case EM_PPC64: reltype = R_PPC64_ADDR64; gpfx = '_'; break; | 359 | case EM_PPC64: reltype = R_PPC64_ADDR64; gpfx = '_'; break; |
