From 3db227386148e46d0c1f944e787cb4b247da0e66 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Mon, 10 Aug 2015 21:00:15 +0000 Subject: [PATCH] Add a test showing that objdump (and so ObjectFIle) can handle shndx. It was already passing, we were just not testing the code. llvm-svn: 244504 --- llvm/test/Object/Inputs/shndx.elf | Bin 0 -> 824 bytes llvm/test/Object/objdump-shndx.test | 8 ++++++++ 2 files changed, 8 insertions(+) create mode 100644 llvm/test/Object/Inputs/shndx.elf create mode 100644 llvm/test/Object/objdump-shndx.test diff --git a/llvm/test/Object/Inputs/shndx.elf b/llvm/test/Object/Inputs/shndx.elf new file mode 100644 index 0000000000000000000000000000000000000000..f1e0a3a8df7d797543936e91e2dd266dc4d827d2 GIT binary patch literal 824 zcmbVKF>V4e5Zr?(geXOzqNGScWl>V0D@a6Jzz(&gg z4I`a*cD%FpTDN)s{HSGFT_Q3WN|q88cZ%l+o=fwha=%w)Ct8l@zqEa zp25%V<;vN&cVV^;;)<#gSN$x4FDBL3a=I?1@TJUGE6AaQoVLYHeekO9y|f48>Cse^ zzsQG5BR#u2a?VJNQ6rDZgBHPUPOsHy`Q-w1jzJoTe9NbpCw+jNJ?splSZ9Mh>jeeu ud9S|qz8{h1Pw^j9x+7@- literal 0 HcmV?d00001 diff --git a/llvm/test/Object/objdump-shndx.test b/llvm/test/Object/objdump-shndx.test new file mode 100644 index 0000000..dcdb3c2 --- /dev/null +++ b/llvm/test/Object/objdump-shndx.test @@ -0,0 +1,8 @@ +RUN: llvm-objdump -r %p/Inputs/shndx.elf | FileCheck %s + +Test that llvm-objdump can handle shndx. The relocation points to a section +symbol that has st_shndx == SHN_XINDEX. To print the section name llvm-objdump +has to use the shndx section. + +CHECK: RELOCATION RECORDS FOR [.rela.text]: +CHECK-NEXT: 0000000000000000 R_X86_64_32 bar+0 -- 2.7.4