Commit Graph

3648 Commits

Author SHA1 Message Date
Alan Modra 1fc2533bde daily update 2004-05-28 00:00:09 +00:00
Michael Chastain d866f350ab 2004-05-27 Michael Chastain <mec.gnu@mindspring.com>
* Makefile.am (bfdver.h): Use explicit filename, not $< .
	* Makefile.in: Regenerate.
2004-05-27 21:22:49 +00:00
Alexandre Oliva 1055df0f95 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
custom calling conventions for dynamic symbols.
(mn10300_elf_relax_section): Avoid relaxing a function as a local
symbol if it's an alias to a global one.
2004-05-27 06:22:54 +00:00
H.J. Lu b309625038 bfd/
2004-05-26  H.J. Lu  <hongjiu.lu@intel.com>

	* elf.c (_bfd_elf_make_section_from_shdr): Undo the last
	change.

ld/

2004-05-26  H.J. Lu  <hongjiu.lu@intel.com>

	* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Clear
	SEC_EXCLUDE on non-SEC_DEBUGGING sections for relocatable link.
	* ldlang.c (lang_add_section): Likewise.
2004-05-27 05:53:36 +00:00
Alexandre Oliva 9bb351fd9c * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
loop over hashes.
2004-05-27 04:07:41 +00:00
Alan Modra d4e145e024 daily update 2004-05-27 00:00:05 +00:00
Alan Modra e49f502242 bfd/
* elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
	for SHT_GROUP sections.
ld/
	* ldlang.c (lang_add_section): Set SEC_EXCLUDE for SEC_GROUP
	sections when doing a final link.  Clear SEC_EXCLUDE when doing
	a relocable link, except for SEC_DEBUGGING sections.
	* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Use the
	same condition here to drop SEC_EXCLUDE orphan sections.
2004-05-26 10:23:51 +00:00
Alan Modra 5f31302fbf daily update 2004-05-26 00:00:07 +00:00
Alan Modra 57ceae9483 bfd/
* elflink.c (elf_link_add_object_symbols): Don't set up merge
	section data here..
	* elf.c (_bfd_elf_merge_sections): .. Do it here instead.
	* merge.c: Formatting.  Remove unnecessary casts.  Expand
	bfd_get_section_alignment macro.
	(struct sec_merge_sec_info): Rename "first" to "first_str".  Update
	use throughout file.
	(_bfd_add_merge_section): Rename from _bfd_merge_section.  Update
	comment.  Abort on dynamic or non-SEC_MERGE input.  Don't test
	section name to determine sinfo group, instead test output section
	and alignment.
	(_bfd_merge_sections): Add struct bfd_link_info param.  Call
	_bfd_strip_section_from_output rather than just twiddling flags.
	* libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
	(_bfd_merge_sections): Update prototype.
	* libbfd.h: Regenerate.
ld/
	* ldlang.c (lang_process): Call bfd_merge_sections later, and
	only when not a relocatable link.
	(print_input_section): Handle SEC_EXCLUDE sections.
	(size_input_section): Don't update dot on SEC_EXCLUDE sections.
	(lang_do_assignments_1): Likewise.
	* ldwrite.c (build_link_order): Ignore SEC_EXCLUDE input sections.
	* emultempl/armelf.em (arm_elf_set_bfd_for_interworking): Likewise.
	* emultempl/hppaelf.em (build_section_lists): Likewise.
	* emultempl/ppc64elf.em (build_toc_list): Likewise.
	(build_section_lists): Likewise.
2004-05-25 06:33:51 +00:00
Alan Modra f021ea9c68 daily update 2004-05-25 00:00:07 +00:00
Mark Kettenis d34436e841 * netbsd-core.c: Correctly indent section that sets architecture
from machine ID.
2004-05-24 21:52:38 +00:00
Mark Kettenis 2b6a3be6c8 Really add this file. 2004-05-24 16:09:10 +00:00
Nick Clifton c6f8758fa0 Add support for an m88k-openbsd target 2004-05-24 14:48:18 +00:00
Nick Clifton 7d7e6bc475 Remove bogus inode 2004-05-24 07:49:10 +00:00
Alan Modra 20135044c7 daily update 2004-05-24 00:00:06 +00:00
Ben Elliston bc286f95ec * configure.in (is_release): Remove.
(bfd_version_date, bfd_version, bfd_version_string): Likewise.
	(AC_OUTPUT): Don't output bfdver.h from version.h.
	* configure: Regenerate.
	* Makefile.am (RELEASE): New variable.
	(bfdver.h): New target.
	* Makefile.in: Regenerate.
	* doc/Makefile.in: Likewise.
2004-05-23 00:06:49 +00:00
Alan Modra fb90c1aa1f daily update 2004-05-23 00:00:06 +00:00
Ben Elliston 8b89a4eb74 * Makefile.am (config.status): Don't depend on version.h.
* Makefile.in: Regenerate.
2004-05-22 06:06:22 +00:00
Alan Modra 753731eef0 * merge.c (_bfd_merged_section_offset): Remove "addend" param.
* libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
	* libbfd.h: Regenerate.
	* elf.c (_bfd_elf_rela_local_sym): Adjust call.
	(_bfd_elf_rel_local_sym): Likewise.
	* elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
	(elf_link_input_bfd): Likewise.
	* elf32-ppc.c (ppc_elf_relax_section): Likewise.
	* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
	* elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
	(elfNN_ia64_relocate_section): Likewise.
2004-05-22 01:56:31 +00:00
Alan Modra 6f3f9b82aa daily update 2004-05-22 00:00:10 +00:00
Nick Clifton 2d643429de Add --hash-size switch to the linker 2004-05-21 15:38:04 +00:00
Mark Kettenis 8377c19cc4 * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
* netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
arm, m68k, m88k and hppa core files.
2004-05-21 14:56:07 +00:00
Nick Clifton 69fd475884 Do not use iovec if it is NULL. 2004-05-21 13:12:27 +00:00
Ben Elliston cd9172901c * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction. 2004-05-21 01:58:03 +00:00
Alan Modra eabed8b57d daily update 2004-05-21 00:00:06 +00:00
Alan Modra 7c8321e44e daily update 2004-05-20 00:00:05 +00:00
Nick Clifton 1b09e940ec Add code to cope with nested archives. 2004-05-19 14:46:59 +00:00
Alan Modra 503d4b41b8 daily update 2004-05-19 00:00:05 +00:00
Alan Modra 3791609a54 daily update 2004-05-18 00:00:05 +00:00
Bob Wilson 096c35a790 * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
section names by inserting a new substring after .gnu.linkonce, except
	for .gnu.linkonce.t.* where the "t." is replaced.
2004-05-17 20:33:33 +00:00
Nick Clifton b2d65c0b3f Add PowerPC LynxOS support 2004-05-17 19:50:16 +00:00
Bob Wilson 80fccad2d4 binutils ChangeLog:
2004-05-17  David Heine  <dlheine@tensilica.com>
	* objcopy.c (setup_bfd_headers): New function.
	(copy_object): Call setup_bfd_headers.
bfd ChangeLog:
	2004-05-17  David Heine  <dlheine@tensilica.com>
	* aout-target.h (MY_bfd_copy_private_header_data): Define.
	* aout-tic30.c (MY_bfd_copy_private_header_data): Define.
	* bfd.c (bfd_copy_private_header_data): Define.
	* coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
	interface.
	* coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
	* coffcode.h (coff_bfd_copy_private_header_data): Define.
	* elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
	* elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
	segments by calling copy_private_bfd_data.
	(_bfd_elf_copy_private_header_data): Define.
	* elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
	* libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
	* libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
	* mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
	* mmo.c (mmo_bfd_copy_private_header_data): Define.
	* ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
	* som.c (som_bfd_copy_private_header_data): Define.
	* targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
	* vms.c (vms_bfd_copy_private_header_data): Define.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.
2004-05-17 16:40:01 +00:00
Alan Modra a74180ee33 daily update 2004-05-17 00:00:08 +00:00
Alan Modra 7154e72862 daily update 2004-05-16 00:00:06 +00:00
Thiemo Seufer c5ae18403c * elfxx-mips.c (MINUS_TWO): Define.
(mips_elf_higher, mips_elf_highest,
	mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
	some bfd_vma values.
	(_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
2004-05-15 18:58:05 +00:00
Alan Modra 366ddcd57f daily update 2004-05-15 00:00:06 +00:00
Dave Anglin a99cf92b09 * som.c (log2): Rename to exact_log2. Adjust all callers. 2004-05-14 17:42:47 +00:00
Alan Modra 541094f34a daily update 2004-05-14 00:32:17 +00:00
Nick Clifton 336b9722b8 Remove comment rendered obsolete by previous delta 2004-05-13 15:16:00 +00:00
Nick Clifton c273895f54 fix typo in file name 2004-05-13 14:49:49 +00:00
Nick Clifton 0da76f83eb Handle dwarf3 format CIE entries. 2004-05-13 14:41:18 +00:00
Nick Clifton 4b36307329 Change or32-rtems target from COFF to ELF format 2004-05-13 14:12:27 +00:00
Nick Clifton 9598fbe5d4 Updated French translations 2004-05-13 12:54:36 +00:00
Alan Modra 99468cd708 daily update 2004-05-13 00:00:05 +00:00
Jakub Jelinek 8c37241be3 bfd/
* elflink.c (elf_bfd_final_link): Don't output STT_SECTION symbol
	into .dynsym if elf_section_data (sec)->dynindx <= 0.
	Adjust counting of last_local.
	(_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
	other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
	created by the linker nor !SHF_ALLOC.

	* elf32-i386.c (elf_i386_finish_dynamic_sections): Point
	DT_PLTGOT to the start of the .got.plt section instead of the
	.got output section.  Set sh_entsize for .got section in addition
	to .got.plt.
	(elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
	is at sgot->output_section->vma.
	* elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
	DT_PLTGOT to the start of the .got.plt section instead of the
	.got output section.
	(elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
	is at sgot->output_section->vma.  Set sh_entsize for .got section
	in addition to .got.plt.
	* elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
	(bfd_section_from_phdr): Likewise.
	(map_sections_to_segments): Likewise.
	(assign_file_positions_for_segments): Likewise.
	(get_program_header_size): Likewise.
	* elflink.c (bfd_elf_size_dynamic_sections): Set
	elf_tdata (output_bfd)->relro from info->relro.
	* elf-bfd.h (struct elf_obj_tdata): Add relro field.
include/
	* bfdlink.h (struct bfd_link_info): Add relro, relro_start and
	relro_end fields.
	* elf/common.h (PT_GNU_EH_FRAME, PT_GNU_STACK): Add comments.
	(PT_GNU_RELRO): Define.
binutils/
	* readelf.c (get_segment_type): Handle PT_GNU_RELRO.
ld/
	* genscripts.sh: Generate -z combreloc -z now -z relro scripts
	for binaries, -shared and -pie.
	* emulparams/elf_i386.sh (SEPARATE_GOTPLT): Set.
	* emulparams/elf_x86_64.sh (SEPARATE_GOTPLT): Set.
	* emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS): Rename to...
	(OTHER_RELRO_SECTIONS): ... this.
	* ldlex.l (DATA_SEGMENT_RELRO_END): Add.
	* emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Handle
	-z relro and -z norelro.
	(gld${EMULATION_NAME}_list_options): Add it to usage.
	(gld${EMULATION_NAME}_get_script): Return -z combreloc -z now
	-z relro scripts when appropriate.
	* scripttempl/elf.sc: Unset SEPARATE_GOTPLT if RELRO_NOW is set.
	Create separate .got.plt section if SEPARATE_GOTPLT.
	Move sections which are only written during relocation handling
	to the beginning of RW segment.  If NO_SMALL_DATA, move .got
	before .data.  Add DATA_SEGMENT_RELRO_END directive.
	Include OTHER_RELRO_SECTIONS.
	* ldgram.y (DATA_SEGMENT_RELRO_END): Add.
	* ldexp.c (exp_print_token): Handle DATA_SEGMENT_RELRO_END.
	(fold_unary): Likewise.
	(fold_binary): Handle -z relro.
	* ldexp.h (struct exp_data_seg): Add exp_dataseg_relro_seen and
	exp_dataseg_relro_adjust phases.  Add relro_end field.
	* ldmain.c (main): Initialize link_info.relro to FALSE.
	* ldlang.c (lang_size_sections): Handle -z relro.
ld/testsuite/
	* ld-i386/tlspic.rd: Adjust for section reordering changes
	and removal of unneeded STT_SECTION symbols from .dynsym.
	* ld-i386/tlspic.dd: Likewise.
	* ld-i386/tlspic.sd: Likewise.
	* ld-i386/tlsbin.rd: Likewise.
	* ld-i386/tlsbinpic.s: Likewise.
	* ld-i386/tlsbin.dd: Likewise.
	* ld-i386/tlsbin.sd: Likewise.
	* ld-i386/tlsnopic.rd: Likewise.
	* ld-i386/tlsnopic1.s: Likewise.
	* ld-i386/combreloc.d: Likewise.
	* ld-i386/tlsnopic.dd: Likewise.
	* ld-i386/tlsnopic.sd: Likewise.
	* ld-x86-64/tlspic.rd: Likewise.
	* ld-x86-64/tlspic.dd: Likewise.
	* ld-x86-64/tlsbin.dd: Likewise.
	* ld-x86-64/tlspic.sd: Likewise.
	* ld-x86-64/tlsbin.sd: Likewise.
	* ld-x86-64/tlspic.td: Likewise.
	* ld-x86-64/tlsbin.td: Likewise.
	* ld-x86-64/tlsbin.rd: Likewise.
	* ld-s390/tlspic1.s: Likewise.
	* ld-s390/tlsbinpic.s: Likewise.
	* ld-s390/tlspic.rd: Likewise.
	* ld-s390/tlsbin.rd: Likewise.
	* ld-s390/tlspic.dd: Likewise.
	* ld-s390/tlsbin.dd: Likewise.
	* ld-s390/tlsbin.sd: Likewise.
	* ld-s390/tlsbin.td: Likewise.
	* ld-s390/tlspic.sd: Likewise.
	* ld-s390/tlspic.td: Likewise.
	* ld-s390/tlspic1_64.s: Likewise.
	* ld-s390/tlsbinpic_64.s: Likewise.
	* ld-s390/tlspic_64.rd: Likewise.
	* ld-s390/tlsbin_64.rd: Likewise.
	* ld-s390/tlspic_64.dd: Likewise.
	* ld-s390/tlsbin_64.dd: Likewise.
	* ld-s390/tlspic_64.sd: Likewise.
	* ld-s390/tlspic_64.td: Likewise.
	* ld-s390/tlsbin_64.td: Likewise.
	* ld-s390/tlsbin_64.sd: Likewise.
	* ld-powerpc/tlsexe32.r: Likewise.
	* ld-powerpc/tlsso32.r: Likewise.
	* ld-powerpc/tlsso32.d: Likewise.
	* ld-powerpc/tlsso32.g: Likewise.
	* ld-powerpc/tlsso32.t: Likewise.
	* ld-powerpc/tlsexe.r: Likewise.
	* ld-powerpc/tlsso.r: Likewise.
	* ld-powerpc/tlsso.g: Likewise.
	* ld-powerpc/tlsexetoc.r: Likewise.
	* ld-powerpc/tlstocso.r: Likewise.
	* ld-powerpc/tlstocso.g: Likewise.
	* ld-ia64/tlspic.rd: Likewise.
	* ld-ia64/tlspic.dd: Likewise.
	* ld-ia64/tlspic.sd: Likewise.
	* ld-ia64/tlspic.td: Likewise.
	* ld-ia64/tlsbin.rd: Likewise.
	* ld-ia64/tlsbin.sd: Likewise.
	* ld-ia64/tlsbin.td: Likewise.
	* ld-elfvsb/elfvsb.exp: XFAIL non-PIC load offset tests on s390x.
	* ld-shared/shared.exp: Likewise.
2004-05-11 17:08:38 +00:00
Alan Modra 12519a0a9d daily update 2004-05-11 00:00:06 +00:00
Alan Modra c24b60e1b0 daily update 2004-05-10 00:00:27 +00:00
Alexandre Oliva 3f980e41d7 * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
a zero symndx for which we hadn't accounted a dynamic relocation.
(_frvfdpic_add_rofixup): Likewise.
2004-05-08 07:05:32 +00:00
Alan Modra dd732f94a8 daily update 2004-05-08 00:00:07 +00:00
Brian Ford d70270c5ec * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
* peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
IMAGE_FILE_LARGE_ADDRESS_AWARE.  Use PE defines.
2004-05-07 15:08:49 +00:00