brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · 3695599 Raw
36 lines · plain
1RUN: %python %p/../Inputs/ungzip.py %p/Inputs/bigobj.o.gz > %t.in.o2 3RUN: llvm-objdump -t %t.in.o | FileCheck %s --check-prefixes=SYMBOLS,SYMBOLS-BIG,SYMBOLS-ORIG4 5# Do a plain copy, to check that section numbers in symbols referring6# to sections outside of the small object format are handled correctly.7RUN: llvm-objcopy -R '.text$4' %t.in.o %t.small.o8RUN: llvm-objdump -t %t.in.o | FileCheck %s --check-prefixes=SYMBOLS,SYMBOLS-BIG,SYMBOLS-ORIG9 10# Remove a section, making the section count fit into a small object.11RUN: llvm-objcopy -R '.text$4' %t.in.o %t.small.o12RUN: llvm-objdump -t %t.small.o | FileCheck %s --check-prefixes=SYMBOLS,SYMBOLS-SMALL,SYMBOLS-REMOVED-SMALL13 14# Add a .gnu_debuglink section, forcing the object back to big format.15RUN: llvm-objcopy --add-gnu-debuglink=%t.in.o %t.small.o %t.big.o16RUN: llvm-objdump -t %t.big.o | FileCheck %s --check-prefixes=SYMBOLS,SYMBOLS-BIG,SYMBOLS-REMOVED-BIG17 18# In big object format, the .file symbol occupies one symbol table entry for19# the auxillary data, but needs two entries in the small format, forcing the20# raw symbol indices of later symbols to change.21SYMBOLS:            SYMBOL TABLE:22SYMBOLS-NEXT:       [ 0]{{.*}} (nx 1) {{.*}} .text23SYMBOLS-NEXT:       AUX scnlen24SYMBOLS-SMALL-NEXT: [ 2]{{.*}} (nx 2) {{.*}} .file25SYMBOLS-BIG-NEXT:   [ 2]{{.*}} (nx 1) {{.*}} .file26SYMBOLS-NEXT:       AUX abcdefghijklmnopqrs27SYMBOLS-SMALL-NEXT: [ 5]{{.*}} (nx 0) {{.*}} foo28SYMBOLS-BIG-NEXT:   [ 4]{{.*}} (nx 0) {{.*}} foo29 30# Check that the section numbers outside of signed 16 bit int range31# are represented properly. After removing one section, the section32# numbers decrease.33SYMBOLS-ORIG:          [ 5](sec 65280){{.*}} symbol6528034SYMBOLS-REMOVED-SMALL: [ 6](sec 65279){{.*}} symbol6528035SYMBOLS-REMOVED-BIG:   [ 5](sec 65279){{.*}} symbol6528036