[Bug 221107] -r322109 and -r322210 (so clang 5) TARGET_ARCH=powerpc agp.kld or agp.kld gets: R_PPC_PLTREL24 reloc against local symbol; could not read symbols: Bad value

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Aug 11 02:13:19 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221107

--- Comment #6 from Mark Millard <markmi at dsl-only.net> ---
Using the agp example:

Section Headers:
  [Nr] Name
       Type            Addr     Off    Size   ES   Lk Inf Al
       Flags
. . .
  [35] .symtab
       SYMTAB          00000000 025418 000b40 10  36 108  4
       [00000000]: 

is related to:

      r_symndx = ELF32_R_SYM (rel->r_info);
      if (r_symndx < symtab_hdr->sh_info)
        h = NULL;
      else  

where for the agp example: r_symndx == 0x49
(73 decimal) for agp_find_caps. So
r_symndx < 108 (if 108 is the sh_info field
value).

Note that in agp.o :

    58: 0000000000000000   172 FUNC    GLOBAL DEFAULT    2 agp_find_caps

but in agp.kld :

    73: 0000000000000000   172 FUNC    LOCAL  DEFAULT    1 agp_find_caps



For the aha example:

  [34] .symtab
       SYMTAB          00000000 020a54 000930 10  35  70  4
       [00000000]: 

So 0x3e == 62 for aha_alloc and 62 < 70.

Note that in aha.o :

    44: 0000000000000000    96 FUNC    GLOBAL DEFAULT    2 aha_alloc

but in aha.kld :

    62: 0000000000000000    96 FUNC    LOCAL  DEFAULT    1 aha_alloc

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list