* elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
R_X86_64_64 to R_X86_64_RELATIVE.
This commit is contained in:
parent
29e2951eb7
commit
607c0e0944
|
@ -1,3 +1,8 @@
|
||||||
|
2002-07-01 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
* elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
|
||||||
|
R_X86_64_64 to R_X86_64_RELATIVE.
|
||||||
|
|
||||||
2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
|
2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
|
||||||
|
|
||||||
* vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
|
* vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
|
||||||
|
|
|
@ -1876,9 +1876,44 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* This symbol is local, or marked to become local. */
|
/* This symbol is local, or marked to become local. */
|
||||||
relocate = true;
|
if (r_type == R_X86_64_64)
|
||||||
outrel.r_info = ELF64_R_INFO (0, R_X86_64_RELATIVE);
|
{
|
||||||
outrel.r_addend = relocation + rel->r_addend;
|
relocate = true;
|
||||||
|
outrel.r_info = ELF64_R_INFO (0, R_X86_64_RELATIVE);
|
||||||
|
outrel.r_addend = relocation + rel->r_addend;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
long sindx;
|
||||||
|
|
||||||
|
if (h == NULL)
|
||||||
|
sec = local_sections[r_symndx];
|
||||||
|
else
|
||||||
|
{
|
||||||
|
BFD_ASSERT (h->root.type == bfd_link_hash_defined
|
||||||
|
|| (h->root.type
|
||||||
|
== bfd_link_hash_defweak));
|
||||||
|
sec = h->root.u.def.section;
|
||||||
|
}
|
||||||
|
if (sec != NULL && bfd_is_abs_section (sec))
|
||||||
|
sindx = 0;
|
||||||
|
else if (sec == NULL || sec->owner == NULL)
|
||||||
|
{
|
||||||
|
bfd_set_error (bfd_error_bad_value);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
asection *osec;
|
||||||
|
|
||||||
|
osec = sec->output_section;
|
||||||
|
sindx = elf_section_data (osec)->dynindx;
|
||||||
|
BFD_ASSERT (sindx > 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
outrel.r_info = ELF64_R_INFO (sindx, r_type);
|
||||||
|
outrel.r_addend = relocation + rel->r_addend;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sreloc = elf_section_data (input_section)->sreloc;
|
sreloc = elf_section_data (input_section)->sreloc;
|
||||||
|
|
Loading…
Reference in New Issue