From c3bc697974d2d7f3c151cb9853b40cc6bf73ba4b Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Thu, 5 Sep 2019 14:25:57 +0000 Subject: [yaml2obj] Write the section header table after section contents Linkers (ld.bfd/gold/lld) place the section header table at the very end. This allows tools to strip it, which is optional in executable/shared objects. In addition, if we add or section, the size of the section header table will change. Placing the section header table in the end keeps section offsets unchanged. yaml2obj currently places the section header table immediately after the program header. Follow what linkers do to make offset updating easier. Reviewed By: grimar Differential Revision: https://reviews.llvm.org/D67221 llvm-svn: 371074 --- llvm/test/tools/llvm-readobj/elf-dynamic-malformed.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/test/tools/llvm-readobj/elf-dynamic-malformed.test') diff --git a/llvm/test/tools/llvm-readobj/elf-dynamic-malformed.test b/llvm/test/tools/llvm-readobj/elf-dynamic-malformed.test index 9a117281f26..b377eaee213 100644 --- a/llvm/test/tools/llvm-readobj/elf-dynamic-malformed.test +++ b/llvm/test/tools/llvm-readobj/elf-dynamic-malformed.test @@ -216,7 +216,7 @@ ProgramHeaders: # BAD-RELA-NEXT: 0x0000000000000007 RELA 0x1000000 # BAD-RELA-NEXT: 0x0000000000000000 NULL 0x0 # BAD-RELA-NEXT: ] -# BAD-RELA-GNU: Dynamic section at offset 0x1f0 contains 2 entries: +# BAD-RELA-GNU: Dynamic section at offset 0xb0 contains 2 entries: # BAD-RELA-GNU-NEXT: Tag Type Name/Value # BAD-RELA-GNU-NEXT: 0x0000000000000007 (RELA) 0x1000000 # BAD-RELA-GNU-NEXT: 0x0000000000000000 (NULL) 0x0 -- cgit v1.2.3