aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Forney <[email protected]>2021-10-10 13:14:52 -0700
committerMichael Forney <[email protected]>2021-10-10 13:15:09 -0700
commit35e288326d5440d43b06fcd273fa069f22134eb8 (patch)
treedb685b4d855e7c0f738120f9a1c18f3524010d82
parentef9133af166ca531ee9818d01fdeb58e56eaef37 (diff)
Set name of relocation sections.
-rw-r--r--main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/main.c b/main.c
index 227a3d2..f39cec2 100644
--- a/main.c
+++ b/main.c
@@ -136,12 +136,14 @@ static void initsections(void) {
text->hdr.sh_addralign = 4;
textrel = newsection();
+ textrel->hdr.sh_name = elfstr(shstrtab, ".rela.text");
textrel->hdr.sh_type = SHT_RELA;
textrel->hdr.sh_info = text->idx;
textrel->hdr.sh_link = symtab->idx;
textrel->hdr.sh_entsize = sizeof(Elf64_Rela);
datarel = newsection();
+ datarel->hdr.sh_name = elfstr(shstrtab, ".rela.data");
datarel->hdr.sh_type = SHT_RELA;
datarel->hdr.sh_info = data->idx;
datarel->hdr.sh_link = symtab->idx;