Support adding relocations for data sections, handling the cases where

global declared symbols are initialized with references from other global
symbols.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76540 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bruno Cardoso Lopes
2009-07-21 06:51:32 +00:00
parent 634d61b135
commit 68491c1217
4 changed files with 60 additions and 25 deletions

View File

@@ -64,7 +64,9 @@ long int X86ELFWriterInfo::getDefaultAddendForRelTy(unsigned RelTy) const {
if (is64Bit) {
switch(RelTy) {
case R_X86_64_PC32: return -4;
case R_X86_64_32: return 0;
case R_X86_64_32:
case R_X86_64_64:
return 0;
default:
llvm_unreachable("unknown x86_64 relocation type");
}