[lld] r336280 - [ELF] - Extend edata-etext.s test case.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 4 07:47:19 PDT 2018


Author: grimar
Date: Wed Jul  4 07:47:19 2018
New Revision: 336280

URL: http://llvm.org/viewvc/llvm-project?rev=336280&view=rev
Log:
[ELF] - Extend edata-etext.s test case.

We did not have a test that would test that
_etext address is equal to etext, _end == end and _edata == edata.

Because of that, the following line was never
executed when running our tests:
https://github.com/llvm-mirror/lld/blob/master/ELF/Writer.cpp#L928

Patch fixes that.

Modified:
    lld/trunk/test/ELF/edata-etext.s

Modified: lld/trunk/test/ELF/edata-etext.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/edata-etext.s?rev=336280&r1=336279&r2=336280&view=diff
==============================================================================
--- lld/trunk/test/ELF/edata-etext.s (original)
+++ lld/trunk/test/ELF/edata-etext.s Wed Jul  4 07:47:19 2018
@@ -10,6 +10,7 @@
 ##    greater than the address of _etext, the address of _end is same as the address
 ##    of _edata." (https://docs.oracle.com/cd/E53394_01/html/E54766/u-etext-3c.html).
 ## 3) Address of _end is different from _edata because of 2.
+## 4) Addresses of _edata == edata, _end == end and _etext == etext.
 # CHECK:      Sections:
 # CHECK-NEXT:  Idx Name          Size      Address          Type
 # CHECK-NEXT:    0               00000000 0000000000000000
@@ -22,6 +23,9 @@
 # CHECK-NEXT:  000000000020200a         .bss  00000000 _end
 # CHECK-NEXT:  0000000000201001         .text 00000000 _etext
 # CHECK-NEXT:  0000000000201000         .text 00000000 _start
+# CHECK-NEXT:  0000000000202002         .data 00000000 edata
+# CHECK-NEXT:  000000000020200a         .bss  00000000 end
+# CHECK-NEXT:  0000000000201001         .text 00000000 etext
 
 # RUN: ld.lld -r %t.o -o %t2
 # RUN: llvm-objdump -t %t2 | FileCheck %s --check-prefix=RELOCATABLE
@@ -29,7 +33,7 @@
 # RELOCATABLE-NEXT:  0000000000000000 *UND* 00000000 _end
 # RELOCATABLE-NEXT:  0000000000000000 *UND* 00000000 _etext
 
-.global _start,_end,_etext,_edata
+.global _start,_end,_etext,_edata,end,etext,edata
 .text
 _start:
   nop




More information about the llvm-commits mailing list