* Set __ehdr_start rel_from_abs earlier
@ 2022-01-28 6:31 Alan Modra
0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2022-01-28 6:31 UTC (permalink / raw)
To: binutils
This is just a tidy, making the __ehdr_start symbol flag tweaks all in
one place.
* ldelf.c (ldelf_before_allocation): Don't set rel_from_abs
for __ehdr_start.
* ldlang.c (lang_symbol_tweaks): Set it here instead.
diff --git a/ld/ldelf.c b/ld/ldelf.c
index 121c25d948f..33c6a9f1f46 100644
--- a/ld/ldelf.c
+++ b/ld/ldelf.c
@@ -1619,7 +1619,6 @@ ldelf_before_allocation (char *audit, char *depaudit,
sizeof ehdr_start_save_u);
ehdr_start->type = bfd_link_hash_defined;
/* It will be converted to section-relative later. */
- ehdr_start->rel_from_abs = 1;
ehdr_start->u.def.section = bfd_abs_section_ptr;
ehdr_start->u.def.value = 0;
}
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 4e6511ba4ff..5dd3df12a0f 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -7022,6 +7022,7 @@ lang_symbol_tweaks (void)
h->other = (h->other & ~ELF_ST_VISIBILITY (-1)) | STV_HIDDEN;
h->def_regular = 1;
h->root.linker_def = 1;
+ h->root.rel_from_abs = 1;
}
}
}
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-01-28 6:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-28 6:31 Set __ehdr_start rel_from_abs earlier Alan Modra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).