[lld] b5f1fa3 - [ELF][test] --oformat binary: Check that SIZEOF_HEADERS==0

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 28 18:44:30 PST 2021


Author: Fangrui Song
Date: 2021-11-28T18:34:36-08:00
New Revision: b5f1fa3e5c1503137c63d5eab1bd213dea706041

URL: https://github.com/llvm/llvm-project/commit/b5f1fa3e5c1503137c63d5eab1bd213dea706041
DIFF: https://github.com/llvm/llvm-project/commit/b5f1fa3e5c1503137c63d5eab1bd213dea706041.diff

LOG: [ELF][test] --oformat binary: Check that SIZEOF_HEADERS==0

Added: 
    

Modified: 
    lld/test/ELF/oformat-binary.s

Removed: 
    


################################################################################
diff  --git a/lld/test/ELF/oformat-binary.s b/lld/test/ELF/oformat-binary.s
index 708a5dd4acbb1..4b2ad8ec711fd 100644
--- a/lld/test/ELF/oformat-binary.s
+++ b/lld/test/ELF/oformat-binary.s
@@ -30,7 +30,8 @@
 # RUN: od -t x1 %tempty | FileCheck %s
 
 ## NOBITS sections are ignored as well.
-# RUN: echo 'SECTIONS { .text : {*(.text .mysec*)} .data 0x100 (NOLOAD) : {BYTE(0)}}' > %tnobits.lds
+## Also test that SIZEOF_HEADERS evaluates to 0.
+# RUN: echo 'SECTIONS { .text : {. += SIZEOF_HEADERS; *(.text .mysec*)} .data 0x100 (NOLOAD) : {BYTE(0)}}' > %tnobits.lds
 # RUN: ld.lld -T %tnobits.lds %t --oformat binary -o %tnobits
 # RUN: od -t x1 %tnobits | FileCheck %s
 


        


More information about the llvm-commits mailing list