X-Git-Url: http://git.cascardo.info/?p=cascardo%2Flinux.git;a=blobdiff_plain;f=scripts%2Fmod%2Fmodpost.c;h=97d2259ae999b6b7f99f709035b49b6e04e88480;hp=1ec7158b6c1f67e7264260c5995842d93854ee42;hb=731ece41fb1047816303295a0cdfed90a528137e;hpb=78ab952717b62c0ba6ca7f7a27eaa0486685e45f diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 1ec7158b6c1f..97d2259ae999 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -790,6 +790,7 @@ static const char *section_white_list[] = { ".comment*", ".debug*", + ".zdebug*", /* Compressed debug sections. */ ".GCC-command-line", /* mn10300 */ ".mdebug*", /* alpha, score, mips etc. */ ".pdr", /* alpha, score, mips etc. */ @@ -1208,6 +1209,9 @@ static Elf_Sym *find_elf_symbol2(struct elf_info *elf, Elf_Addr addr, * .cpuinit.data => __cpudata * .memexitconst => __memconst * etc. + * + * The memory of returned value has been allocated on a heap. The user of this + * method should free it after usage. */ static char *sec2annotation(const char *s) { @@ -1230,7 +1234,7 @@ static char *sec2annotation(const char *s) strcat(p, "data "); else strcat(p, " "); - return r; /* we leak her but we do not care */ + return r; } else { return strdup(""); } @@ -1438,7 +1442,7 @@ static unsigned int *reloc_location(struct elf_info *elf, int section = shndx2secindex(sechdr->sh_info); return (void *)elf->hdr + sechdrs[section].sh_offset + - r->r_offset - sechdrs[section].sh_addr; + r->r_offset; } static int addend_386_rel(struct elf_info *elf, Elf_Shdr *sechdr, Elf_Rela *r)