summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSean Silva <silvas@purdue.edu>2013-06-20 20:59:47 +0000
committerSean Silva <silvas@purdue.edu>2013-06-20 20:59:47 +0000
commite38f640b22979994b42fb2f2aafc44cc39c20e8e (patch)
tree1c8d9e3d0236542c3bb61a78a2a664381361aff1 /tools
parent6525e92b32c52772f7d750ada7084245655629e6 (diff)
downloadllvm-e38f640b22979994b42fb2f2aafc44cc39c20e8e.tar.gz
llvm-e38f640b22979994b42fb2f2aafc44cc39c20e8e.tar.bz2
llvm-e38f640b22979994b42fb2f2aafc44cc39c20e8e.tar.xz
[yaml2obj][ELF] Add support for st_value and st_size.
After this patch, the ELF file produced by `yaml2obj-elf-symbol-basic.yaml`, when linked and executed on x86_64 (under SysV ABI, obviously; I tested on Linux), produces a working executable that goes into an infinite loop! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184469 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/yaml2obj/yaml2elf.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/yaml2obj/yaml2elf.cpp b/tools/yaml2obj/yaml2elf.cpp
index 421781ce14..a8eeeeacf1 100644
--- a/tools/yaml2obj/yaml2elf.cpp
+++ b/tools/yaml2obj/yaml2elf.cpp
@@ -206,6 +206,8 @@ static void handleSymtabSectionHeader(
exit(1);
}
Symbol.st_shndx = Index;
+ Symbol.st_value = Sym.Value;
+ Symbol.st_size = Sym.Size;
Syms.push_back(Symbol);
}