Files
clang-p2996/lld/test/ELF/mips-nonalloc.s
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
680 B
ArmAsm

# REQUIRES: mips
# Check reading addends for relocations in non-allocatable sections.
# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t1.o
# RUN: echo '.section .debug_info,"",@0x7000001e; .word __start' | \
# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux - -o %t2.o
# RUN: ld.lld %t1.o %t2.o -o %t.exe
# RUN: llvm-objdump -t -s %t.exe | FileCheck %s
# CHECK: [[SYM:[0-9a-f]+]] g .text 00000000 __start
# CHECK: Contents of section .debug_info:
# CHECK-NEXT: 0000 ffffffff [[SYM]] [[SYM]]
# ^-------^-- __start
.global __start
__start:
nop
.section .debug_info,"",@0x7000001e
.word 0xffffffff
.word __start