1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

llvm-nm: Print correct symbol types for init and fini sections

This patch fixes a small bug where symbols defined in the INIT
and FINI sections were incorrectly getting a type of 'n'.

Differential Revision: https://reviews.llvm.org/D26937

llvm-svn: 287803
This commit is contained in:
Meador Inge 2016-11-23 20:17:20 +00:00
parent 4761d43258
commit 6746ba845f
3 changed files with 11 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,8 @@
# RUN: llvm-nm -B -S %p/Inputs/init-fini.out.elf-x86_64 | FileCheck --match-full-lines %s
CHECK: 00000000006000c2 0000000000000000 T __bss_start
CHECK: 00000000006000c2 0000000000000000 t __init_array_end
CHECK: 00000000006000ba 0000000000000000 t __init_array_start
CHECK: 00000000006000c2 0000000000000000 T _edata
CHECK: 00000000006000c8 0000000000000000 T _end
CHECK: 00000000004000b0 0000000000000000 T _start

View File

@ -778,6 +778,9 @@ static char getSymbolNMTypeChar(ELFObjectFileBase &Obj,
break;
case ELF::SHT_NOBITS:
return 'b';
case ELF::SHT_INIT_ARRAY:
case ELF::SHT_FINI_ARRAY:
return 't';
}
}