bh = NULL;
if (!(_bfd_generic_link_add_one_symbol
(info, abfd, "_GLOBAL_OFFSET_TABLE_", BSF_GLOBAL, s,
- bed->got_symbol_offset, (const char *) NULL, FALSE,
- bed->collect, &bh)))
+ 0, (const char *) NULL, FALSE, bed->collect, &bh)))
return FALSE;
h = (struct elf_link_hash_entry *) bh;
h->def_regular = 1;
elf_hash_table (info)->hgot = h;
/* The first bit of the global offset table is the header. */
- s->size += bed->got_header_size + bed->got_symbol_offset;
+ s->size += bed->got_header_size;
return TRUE;
}
else
{
/* This is a global offset table entry for a local
- symbol. */
+ symbol. */
if (local_got_offsets == NULL)
{
size_t size;
bfd_put_32 (input_bfd, value, hit_data);
return bfd_reloc_ok;
-
+
case R_MN10300_GOTPC16:
/* Use global offset table as symbol value. */
value -= bfd_get_section_by_name (dynobj,
".got")->output_section->vma;
value += addend;
-
+
bfd_put_32 (input_bfd, value, hit_data);
return bfd_reloc_ok;
value -= bfd_get_section_by_name (dynobj,
".got")->output_section->vma;
value += addend;
-
+
if ((long) value > 0x7fffff || (long) value < -0x800000)
return bfd_reloc_overflow;
value -= bfd_get_section_by_name (dynobj,
".got")->output_section->vma;
value += addend;
-
+
if ((long) value > 0xffff || (long) value < -0x10000)
return bfd_reloc_overflow;
asection * splt;
splt = bfd_get_section_by_name (dynobj, ".plt");
-
+
value = (splt->output_section->vma
+ splt->output_offset
+ h->plt.offset) - value;
asection * splt;
splt = bfd_get_section_by_name (dynobj, ".plt");
-
+
value = (splt->output_section->vma
+ splt->output_offset
+ h->plt.offset) - value;
asection * sgot;
sgot = bfd_get_section_by_name (dynobj, ".got");
-
+
if (h != NULL)
{
bfd_vma off;
return bfd_reloc_ok;
}
/* Fall through. */
-
+
default:
return bfd_reloc_notsupported;
}
splt = bfd_get_section_by_name (elf_hash_table (link_info)
->dynobj, ".plt");
-
+
value = ((splt->output_section->vma
+ splt->output_offset
+ h->root.plt.offset)
/* We can not relax 0x6b, 0x7b, 0x8b, 0x9b as no 24bit
equivalent instructions exists. */
- if (code != 0x6b && code != 0x7b
+ if (code != 0x6b && code != 0x7b
&& code != 0x8b && code != 0x9b
&& ((code & 0x0f) == 0x09 || (code & 0x0f) == 0x08
|| (code & 0x0f) == 0x0a || (code & 0x0f) == 0x0b
|| (code & 0x0f) == 0x0e))
{
/* Not safe if the high bit is on as relaxing may
- move the value out of high mem and thus not fit
- in a signed 8bit value. This is currently over
- conservative. */
+ move the value out of high mem and thus not fit
+ in a signed 8bit value. This is currently over
+ conservative. */
if ((value & 0x80) == 0)
{
/* Note that we've changed the relocation contents,
if (code == 0xfe)
{
- /* Get the second opcode. */
- code = bfd_get_8 (abfd, contents + irel->r_offset - 2);
+ /* Get the second opcode. */
+ code = bfd_get_8 (abfd, contents + irel->r_offset - 2);
/* All the am33 32 -> 24 relaxing possibilities. */
/* We can not relax 0x6b, 0x7b, 0x8b, 0x9b as no 24bit
|| (code & 0x0f) == 0x0e))
{
/* Not safe if the high bit is on as relaxing may
- move the value out of high mem and thus not fit
- in a signed 16bit value. This is currently over
- conservative. */
+ move the value out of high mem and thus not fit
+ in a signed 16bit value. This is currently over
+ conservative. */
if ((value & 0x8000) == 0)
{
/* Note that we've changed the relocation contents,
&& bfd_get_mach (obfd) < bfd_get_mach (ibfd))
{
if (! bfd_set_arch_mach (obfd, bfd_get_arch (ibfd),
- bfd_get_mach (ibfd)))
- return FALSE;
+ bfd_get_mach (ibfd)))
+ return FALSE;
}
return TRUE;
/* So we can set bits in e_flags. */
#define elf_backend_final_write_processing \
- _bfd_mn10300_elf_final_write_processing
-#define elf_backend_object_p _bfd_mn10300_elf_object_p
+ _bfd_mn10300_elf_final_write_processing
+#define elf_backend_object_p _bfd_mn10300_elf_object_p
#define bfd_elf32_bfd_merge_private_bfd_data \
- _bfd_mn10300_elf_merge_private_bfd_data
+ _bfd_mn10300_elf_merge_private_bfd_data
#define elf_backend_can_gc_sections 1
#define elf_backend_create_dynamic_sections \