This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Seems this one has been overlooked thus far, so I'll take the opportunity to update it ... The original patch omitted the handling of pc-relative relocations in sh_elf_gc_sweep_hook, so I've added that. Since refcounting was introduced, it's necessary to handle some SHmedia absolute relocations in sh_elf_check_relocs, for plt refcounting when you're linking an absolute program to a shared library, so I've added those too, together with the corresponding additions to sh_elf_gc_sweep_hook. Without this absolute relocation plt refcounting you got a linker error, so I've added a test case for that (ld-sh/sh64/dsolink*), which in turn requires a mechanism to create a dso to link against. Kojima-san recently added this to ld-sh/rd-sh.exp, so I've duplicated his work in ld-sh/sh64/rd-sh64.exp. The updated patch is attached. The changelog info is: bfd: * elf32-sh.c (sh_elf_relocate_section): Handle SHmedia PC-relative relocations as dynamic relocations. (sh_elf_gc_sweep_hook): Handle SHmedia PC-relative relocations and SHmedia R_SH_IMM_xxx absolute relocations. (sh_elf_check_relocs): Likewise. * elf64-sh64.c (sh_elf64_relocate_section): Handle SHmedia PC-relative relocations as dynamic relocations. (sh_elf64_check_relocs): Likewise. ld/testsuite: * ld-sh/sh64/dsolink-0-dso.d, ld-sh/sh64/dsolink-1.d, ld-sh/sh64/dsolink-1.s, ld-sh/sh64/dsolinklib.s: New test. * ld-sh/sh64/rd-sh64.exp: Add the dso-creating functionality from ld-sh/rd-sh.exp. * ld-sh/sh64/shpcrel.d, ld-sh/sh64/shpcrel.s, ld-sh/sh64/shpcrel64.d, ld-sh/sh64/shpcrel64.s: New test. Steve.
Attachment:
pcrel-patch.gz
Description: pcrel-patch.gz
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |