summary refs log tree commit diff
path: root/sysdeps/x86_64/dl-runtime.c
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2020-05-27 12:54:21 -0700
committerVineet Gupta <vgupta@synopsys.com>2020-06-05 13:45:46 -0700
commit8dbb7a08ec52057819db4ee234f9429ab99eb4ae (patch)
tree5bf2d690342fc287e1b501de367fa1849505a52c /sysdeps/x86_64/dl-runtime.c
parenta23bd00f9d810c28d9e83ce1d7cf53968375937d (diff)
downloadglibc-8dbb7a08ec52057819db4ee234f9429ab99eb4ae.tar.gz
glibc-8dbb7a08ec52057819db4ee234f9429ab99eb4ae.tar.xz
glibc-8dbb7a08ec52057819db4ee234f9429ab99eb4ae.zip
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>
Diffstat (limited to 'sysdeps/x86_64/dl-runtime.c')
-rw-r--r--sysdeps/x86_64/dl-runtime.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/sysdeps/x86_64/dl-runtime.c b/sysdeps/x86_64/dl-runtime.c
deleted file mode 100644
index b625d1e882..0000000000
--- a/sysdeps/x86_64/dl-runtime.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* The ABI calls for the PLT stubs to pass the index of the relocation
-   and not its offset.  In _dl_profile_fixup and _dl_call_pltexit we
-   also use the index.  Therefore it is wasteful to compute the offset
-   in the trampoline just to reverse the operation immediately
-   afterwards.  */
-#define reloc_offset reloc_arg * sizeof (PLTREL)
-#define reloc_index  reloc_arg
-
-#include <elf/dl-runtime.c>