musl/arch/sh
Rich Felker f4cc276018 multiple fixes to sh (superh) dynamic linker relocations
the following issues are fixed:

- R_SH_REL32 was adding the load address of the module being relocated
  to the result. this seems to have been a mistake in the original
  port, since it does not match other dynamic linker implementations
  and since adding a difference between two addresses (the symbol
  value and the relocation address) to a load address does not make
  sense.

- R_SH_TLS_DTPMOD32 was wrongly accepting an inline addend (i.e. using
  += rather than = on *reloc_addr) which makes no sense; addition is
  not an operation that's defined on module ids.

- R_SH_TLS_DTPOFF32 and R_SH_TLS_TPOFF32 were wrongly using inline
  addends rather than the RELA-provided addends.

in addition, handling of R_SH_GLOB_DAT, R_SH_JMP_SLOT, and R_SH_DIR32
are merged to all honor the addend. the first two should not need it
for correct usage generated by toolchains, but other dynamic linkers
allow addends here, and it simplifies the code anyway.

these issues were spotted while reviewing the code for the purpose of
refactoring this part of the dynamic linker. no testing was performed.
2014-06-17 13:56:54 -04:00
..
bits fix RLIMIT_ constants for mips 2014-04-15 19:17:52 -04:00
src fix typo in filename used in sh port 2014-03-18 22:11:14 -04:00
atomic.h rename superh port to "sh" for consistency 2014-02-27 22:03:25 -05:00
crt_arch.h superh: fix dynamic linking of __fpscr_values 2014-03-16 16:17:28 -05:00
pthread_arch.h rename superh port to "sh" for consistency 2014-02-27 22:03:25 -05:00
reloc.h multiple fixes to sh (superh) dynamic linker relocations 2014-06-17 13:56:54 -04:00
syscall_arch.h rename superh port to "sh" for consistency 2014-02-27 22:03:25 -05:00