Files
clang-p2996/lld/test/ELF/linkerscript/align5.test
Fangrui Song f9a0056016 [llvm-objdump] --syms: make flags closer to GNU objdump
This fixes several issues. The behavior changes are:

A SHN_COMMON symbol does not have the 'g' flag.
An undefined symbol does not have 'g' or 'l' flag.
A STB_GLOBAL SymbolRef::ST_Unknown symbol has the 'g' flag.
A STB_LOCAL SymbolRef::ST_Unknown symbol has the 'l' flag.

Reviewed By: rupprecht

Differential Revision: https://reviews.llvm.org/D75659
2020-03-05 09:59:53 -08:00

24 lines
623 B
Plaintext

# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/align.s -o %t.o
# RUN: ld.lld -o %t --script %s %t.o
# RUN: llvm-objdump -t %t | FileCheck %s
SECTIONS {
. = 0xff8;
.aaa : {
*(.aaa)
foo = ALIGN(., 0x100);
bar = .;
zed1 = ALIGN(., 0x100) + 1;
zed2 = ALIGN(., 0x100) - 1;
}
.bbb : { *(.bbb); }
.ccc : { *(.ccc); }
.text : { *(.text); }
}
# CHECK: 0000000000001000 g .aaa 0000000000000000 foo
# CHECK: 0000000000001000 g .aaa 0000000000000000 bar
# CHECK: 0000000000001001 g .aaa 0000000000000000 zed1
# CHECK: 0000000000000fff g .aaa 0000000000000000 zed2