* elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options

for n32, too.
	(MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
	(mips_elf_rel_dyn_section): Use appropriate section alignment.
	(mips_elf_create_got_section): Likewise.
	(_bfd_mips_elf_create_dynamic_sections): Likewise.
	* ld-mips-elf/multi-got-1.d: Adjust addresses.
	* ld-mips-elf/rel32-n32.d: Likewise.
This commit is contained in:
Thiemo Seufer 2003-06-11 21:01:50 +00:00
parent 8c1a34cd5c
commit d80dcc6af4
5 changed files with 8222 additions and 8209 deletions

View File

@ -1,3 +1,12 @@
2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
* elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
for n32, too.
(MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
(mips_elf_rel_dyn_section): Use appropriate section alignment.
(mips_elf_create_got_section): Likewise.
(_bfd_mips_elf_create_dynamic_sections): Likewise.
2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
* elf32-mips.c (mips_elf_generic_reloc): New Function.

View File

@ -516,11 +516,11 @@ static bfd *reldyn_sorting_bfd;
/* The name of the options section. */
#define MIPS_ELF_OPTIONS_SECTION_NAME(abfd) \
(ABI_64_P (abfd) ? ".MIPS.options" : ".options")
(NEWABI_P (abfd) ? ".MIPS.options" : ".options")
/* The name of the stub section. */
#define MIPS_ELF_STUB_SECTION_NAME(abfd) \
(ABI_64_P (abfd) ? ".MIPS.stubs" : ".stub")
(NEWABI_P (abfd) ? ".MIPS.stubs" : ".stub")
/* The size of an external REL relocation. */
#define MIPS_ELF_REL_SIZE(abfd) \
@ -1663,7 +1663,7 @@ mips_elf_rel_dyn_section (dynobj, create_p)
| SEC_LINKER_CREATED
| SEC_READONLY))
|| ! bfd_set_section_alignment (dynobj, sreloc,
4))
MIPS_ELF_LOG_FILE_ALIGN (dynobj)))
return NULL;
}
return sreloc;
@ -2873,7 +2873,7 @@ mips_elf_create_got_section (abfd, info, maybe_exclude)
s = bfd_make_section (abfd, ".got");
if (s == NULL
|| ! bfd_set_section_flags (abfd, s, flags)
|| ! bfd_set_section_alignment (abfd, s, 4))
|| ! bfd_set_section_alignment (abfd, s, MIPS_ELF_LOG_FILE_ALIGN (abfd)))
return FALSE;
/* Define the symbol _GLOBAL_OFFSET_TABLE_. We don't do this in the
@ -4974,19 +4974,19 @@ _bfd_mips_elf_create_dynamic_sections (abfd, info)
/* Change alignments of some sections. */
s = bfd_get_section_by_name (abfd, ".hash");
if (s != NULL)
bfd_set_section_alignment (abfd, s, 4);
bfd_set_section_alignment (abfd, s, MIPS_ELF_LOG_FILE_ALIGN (abfd));
s = bfd_get_section_by_name (abfd, ".dynsym");
if (s != NULL)
bfd_set_section_alignment (abfd, s, 4);
bfd_set_section_alignment (abfd, s, MIPS_ELF_LOG_FILE_ALIGN (abfd));
s = bfd_get_section_by_name (abfd, ".dynstr");
if (s != NULL)
bfd_set_section_alignment (abfd, s, 4);
bfd_set_section_alignment (abfd, s, MIPS_ELF_LOG_FILE_ALIGN (abfd));
s = bfd_get_section_by_name (abfd, ".reginfo");
if (s != NULL)
bfd_set_section_alignment (abfd, s, 4);
bfd_set_section_alignment (abfd, s, MIPS_ELF_LOG_FILE_ALIGN (abfd));
s = bfd_get_section_by_name (abfd, ".dynamic");
if (s != NULL)
bfd_set_section_alignment (abfd, s, 4);
bfd_set_section_alignment (abfd, s, MIPS_ELF_LOG_FILE_ALIGN (abfd));
}
if (!info->shared)

View File

@ -1,3 +1,8 @@
2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
* ld-mips-elf/multi-got-1.d: Adjust addresses.
* ld-mips-elf/rel32-n32.d: Likewise.
2003-06-11 Alan Modra <amodra@bigpond.net.au>
* ld-srec/srec.exp (run_srec_test): Remove powerpc64 xfails, and

File diff suppressed because it is too large Load Diff

View File

@ -4,13 +4,12 @@
#readelf: -x 5 -r
#ld: -shared -melf32btsmipn32
Relocation section '.rel.dyn' at offset 0x3d0 contains 2 entries:
Relocation section '.rel.dyn' at offset 0x3dc contains 2 entries:
Offset Info Type Sym.Value Sym. Name
00000000 00000000 R_MIPS_NONE
000003f0 00000003 R_MIPS_REL32
00000400 00000003 R_MIPS_REL32
Hex dump of section '.text':
0x000003e0 00000000 00000000 00000000 00000000 ................
0x000003f0 000003f0 00000000 00000000 00000000 ................
0x00000400 00000000 00000000 00000000 00000000 ................
0x000003f0 00000000 00000000 00000000 00000000 ................
0x00000400 00000400 00000000 00000000 00000000 ................
0x00000410 00000000 00000000 00000000 00000000 ................