Commit Graph

4 Commits

Author SHA1 Message Date
Rich Felker adf94c1966 refactor to remove arch-specific relocation code from dynamic linker
this was one of the main instances of ugly code duplication: all archs
use basically the same types of relocations, but roughly equivalent
logic was duplicated for each arch to account for the different naming
and numbering of relocation types and variation in whether REL or RELA
records are used.

as an added bonus, both REL and RELA are now supported on all archs,
regardless of which is used by the standard toolchain.
2014-06-18 02:44:02 -04:00
Rich Felker bfa09700b9 dynamic linker: permit error returns from arch-specific reloc function
the immediate motivation is supporting TLSDESC relocations which
require allocation and thus may fail (unless we pre-allocate), but
this mechanism should also be used for throwing an error on
unsupported or invalid relocation types, and perhaps in certain cases,
for reporting when a relocation is not satisfiable.
2014-06-16 03:09:07 -04:00
Rich Felker 744f11897a make the x32 port use the correct ld-musl-x32.path filename
previously it was wrongly using the x86_64 one, precluding having both
x32 and x86_64 libs present on the same system.
2014-02-23 23:20:18 -05:00
rofl0r 323272db17 import vanilla x86_64 code as x32 2014-02-23 11:07:18 +01:00