[llvm] r200433 - Fix TLS handling in ELF's getAddress and llvm-nm to print 'D' for it.
Rafael Espindola
rafael.espindola at gmail.com
Wed Jan 29 16:42:31 PST 2014
Author: rafael
Date: Wed Jan 29 18:42:30 2014
New Revision: 200433
URL: http://llvm.org/viewvc/llvm-project?rev=200433&view=rev
Log:
Fix TLS handling in ELF's getAddress and llvm-nm to print 'D' for it.
Modified:
llvm/trunk/include/llvm/Object/ELFObjectFile.h
llvm/trunk/test/Object/nm-shared-object.test
llvm/trunk/tools/llvm-nm/llvm-nm.cpp
Modified: llvm/trunk/include/llvm/Object/ELFObjectFile.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/ELFObjectFile.h?rev=200433&r1=200432&r2=200433&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/ELFObjectFile.h (original)
+++ llvm/trunk/include/llvm/Object/ELFObjectFile.h Wed Jan 29 18:42:30 2014
@@ -295,6 +295,7 @@ error_code ELFObjectFile<ELFT>::getSymbo
case ELF::STT_FUNC:
case ELF::STT_OBJECT:
case ELF::STT_NOTYPE:
+ case ELF::STT_TLS:
bool IsRelocatable;
switch (EF.getHeader()->e_type) {
case ELF::ET_EXEC:
Modified: llvm/trunk/test/Object/nm-shared-object.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/nm-shared-object.test?rev=200433&r1=200432&r2=200433&view=diff
==============================================================================
--- llvm/trunk/test/Object/nm-shared-object.test (original)
+++ llvm/trunk/test/Object/nm-shared-object.test Wed Jan 29 18:42:30 2014
@@ -12,7 +12,7 @@ ELF-32: 0012cc A _end
ELF-32: 0012c8 B common_sym
ELF-32: 0012c4 D defined_sym
ELF-32: 0001f0 T global_func
-ELF-32: ? tls_sym
+ELF-32: 000000 D tls_sym
ELF-64: 200454 A __bss_start
ELF-64: 200454 A _edata
@@ -20,4 +20,4 @@ ELF-64: 200458 A _end
ELF-64: 200454 B common_sym
ELF-64: 200450 D defined_sym
ELF-64: 0002f0 T global_func
-ELF-64: ? tls_sym
+ELF-64: 000000 D tls_sym
Modified: llvm/trunk/tools/llvm-nm/llvm-nm.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-nm/llvm-nm.cpp?rev=200433&r1=200432&r2=200433&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-nm/llvm-nm.cpp (original)
+++ llvm/trunk/tools/llvm-nm/llvm-nm.cpp Wed Jan 29 18:42:30 2014
@@ -331,6 +331,7 @@ static error_code getSymbolNMTypeChar(EL
case(ELF::SHF_ALLOC | ELF::SHF_EXECINSTR) :
Ret = 't';
break;
+ case(ELF::SHF_TLS | ELF::SHF_ALLOC | ELF::SHF_WRITE) :
case(ELF::SHF_ALLOC | ELF::SHF_WRITE) :
Ret = 'd';
break;
More information about the llvm-commits
mailing list