[PATCH] D110090: [LLD][ELF] Restore important part of ICF alignment test

Andrew Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 20 11:27:44 PDT 2021


andrewng created this revision.
andrewng added reviewers: MaskRay, phosek.
Herald added a subscriber: emaste.
andrewng requested review of this revision.

Restore the checking of addresses in ICF test which was testing the
behaviour of ICF with regards to different alignments of otherwise
identical sections. Also make the test more robust to layout changes.


https://reviews.llvm.org/D110090

Files:
  lld/test/ELF/icf7.s


Index: lld/test/ELF/icf7.s
===================================================================
--- lld/test/ELF/icf7.s
+++ lld/test/ELF/icf7.s
@@ -1,14 +1,14 @@
 # REQUIRES: x86
 
 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
-# RUN: ld.lld %t -o %t2 --icf=all --print-icf-sections | FileCheck %s
+# RUN: ld.lld %t -o %t2 --Ttext=220000 --icf=all --print-icf-sections | FileCheck %s
 # RUN: llvm-objdump -t %t2 | FileCheck --check-prefix=ALIGN %s
 
 # CHECK: selected section {{.*}}:(.text.f1)
 # CHECK:   removing identical section {{.*}}:(.text.f2)
 
-# ALIGN: .text 0000000000000000 _start
-# ALIGN: .text 0000000000000000 f1
+# ALIGN: 0000000000220000 g .text 0000000000000000 _start
+# ALIGN: 0000000000220100 g .text 0000000000000000 f1
 
 .globl _start, f1, f2
 _start:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110090.373665.patch
Type: text/x-patch
Size: 799 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210920/538fb5eb/attachment.bin>


More information about the llvm-commits mailing list