dl-runtime: reloc_{offset,index} now functions arch overide'able
authorVineet Gupta <vgupta@synopsys.com>
Wed, 27 May 2020 19:54:21 +0000 (12:54 -0700)
committerVineet Gupta <vgupta@synopsys.com>
Fri, 5 Jun 2020 20:45:46 +0000 (13:45 -0700)
commit8dbb7a08ec52057819db4ee234f9429ab99eb4ae
tree5bf2d690342fc287e1b501de367fa1849505a52c
parenta23bd00f9d810c28d9e83ce1d7cf53968375937d
dl-runtime: reloc_{offset,index} now functions arch overide'able

The existing macros are fragile and expect local variables with a
certain name. Fix this by defining them as functions with default
implementation in a new header dl-runtime.h which arches can override
if need be.

This came up during ARC port review, hence the need for argument pltgot
in reloc_index() which is not needed by existing ports.

This patch potentially only affects hppa/x86 ports,
build tested for both those configs and a few more.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
elf/dl-runtime.c
elf/dl-runtime.h [new file with mode: 0644]
sysdeps/hppa/dl-runtime.c
sysdeps/hppa/dl-runtime.h [new file with mode: 0644]
sysdeps/x86_64/dl-runtime.c [deleted file]
sysdeps/x86_64/dl-runtime.h [new file with mode: 0644]