aboutsummaryrefslogtreecommitdiff
path: root/ld/ldexp.h
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2021-03-04 16:55:01 +0100
committerJan Beulich <jbeulich@suse.com>2021-03-04 16:55:01 +0100
commit6fa7408d72b3805536e3579ba46b48f07f2e780a (patch)
tree4bf2a749afaa5ad0866b5659d2f4f6534fad2d5d /ld/ldexp.h
parent1178743e4c05d9c0daad5a105277fbc42872c9ea (diff)
downloadgdb-6fa7408d72b3805536e3579ba46b48f07f2e780a.zip
gdb-6fa7408d72b3805536e3579ba46b48f07f2e780a.tar.gz
gdb-6fa7408d72b3805536e3579ba46b48f07f2e780a.tar.bz2
ld: don't generate base relocations in PE output for absolute symbols
It is the very nature of absolute symbols that they don't change even if the loader decides to put the image at other than its link-time base address. Of the linker-defined (and PE-specific) symbols __image_base__ (and its alias) needs special casing, as it'll still appear to be absolute at this point. A new inquiry function in ldexp.c is needed because PE base relocations get generated before ldexp_finalize_syms() runs, yet whether a relocation is needed depends on the ultimate property of a symbol.
Diffstat (limited to 'ld/ldexp.h')
-rw-r--r--ld/ldexp.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/ld/ldexp.h b/ld/ldexp.h
index d609617..1055053 100644
--- a/ld/ldexp.h
+++ b/ld/ldexp.h
@@ -239,6 +239,7 @@ bfd_vma exp_get_abs_int
(etree_type *, int, char *);
void ldexp_init (void);
void ldexp_finalize_syms (void);
+bfd_boolean ldexp_is_final_sym_absolute (const struct bfd_link_hash_entry *);
void ldexp_finish (void);
#endif