Commit Graph

1121 Commits

Author SHA1 Message Date
Jakub Jelinek 0841712ea9 * ldgram.y (sect_constraint): New.
(ONLY_IF_RO, ONLY_IF_RW): New tokens.
	(section): Add sect_constraint.  Pass additional argument
	to lang_enter_output_section_statement.
	* mri.c (mri_draw_tree): Pass additional argument to
	lang_enter_output_section_statement.
	* emultempl/pe.em (place_orphan): Likewise.
	(output_prev_sec_find): Disregard output section statements with
	constraint == -1.
	* emultempl/mmo.em (output_prev_sec_find): Likewise.
	(mmo_place_orphan): Pass additional argument to
	lang_enter_output_section_statement.
	* emultempl/elf32.em (output_prev_sec_find): Disregard output section
	statements with constraint == -1.
	(place_orphan): Pass additional argument to
	lang_enter_output_section_statement.
	* ldlang.c (lang_enter_overlay_section): Likewise.
	(lang_output_section_find_1): New.
	(lang_output_section_find): Use it.
	(lang_output_section_statement_lookup_1): New.
	(lang_output_section_statement_lookup): Use it.
	(check_section_callback, check_input_sections): New.
	(map_input_to_output_sections): Check if all input sections
	are readonly if ONLY_IF_RO or ONLY_IF_RW was seen.
	(strip_excluded_output_sections): Disregard output section statements
	with constraint == -1.
	(lang_record_phdrs): Likewise.
	(lang_enter_output_section_statement): Add constraint argument.
	Use lang_output_section_statement_lookup_1.
	* ldlang.h (lang_output_section_statement_type): Add constraint
	and all_input_readonly fields.
	(lang_enter_output_section_statement): Adjust prototype.
	* ldlex.l (ONLY_IF_RO, ONLY_IF_RW): New tokens.
	* scripttempl/elf.sc (.eh_frame, .gcc_except_table): Move into text
	segment if all input sections are readonly.
2004-05-19 14:01:14 +00:00
Nick Clifton f2c5032879 Remove redundant file 2004-05-19 10:00:50 +00:00
Bob Wilson 2a16d82afa * ld.texinfo (Output Section Address): Correct subsection name. 2004-05-17 22:48:55 +00:00
Nick Clifton b2d65c0b3f Add PowerPC LynxOS support 2004-05-17 19:50:16 +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
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
Marek Michalkiewicz e21059f29c * scripttempl/avr.sc: Do not set LMA for "eeprom" section. 2004-05-08 21:52:56 +00:00
Joern Rennecke 5f9b892013 * ldlang.c (print_padding_statement): Cast size_t to bfd_vma
before printing it with %W.
2004-05-07 15:21:27 +00:00
Brian Ford 26d2d8a262 * emultempl/pe.em (real_flags): New static.
(OPTION_LARGE_ADDRESS_AWARE): New define.
(gld${EMULATION_NAME}_add_options): Add --large-address-aware option.
(gld_${EMULATION_NAME}_list_options): Likewise.
(gld${EMULATION_NAME}_handle_option): Likewise.
(gld_${EMULATION_NAME}_after_open): Pass real_flags to PE private data.
* ld.texinfo: Document it.
* NEWS: Mention it.
2004-05-07 15:17:58 +00:00
Brian Ford 1b16950104 * NEWS: Mention DWARF 2 support for i386pe. 2004-05-07 14:49:48 +00:00
Alexandre Oliva 41cf0c6285 * emulparams/elf32frvfd.sh (OUTPUT_FORMAT): Switch to new
elf32-frvfdpic.
2004-05-06 02:46:54 +00:00
Alan Modra d0d6a25bf3 * ldlang.c (unique_section_p): Pass section parm, return true on
group sections.
	(output_section_callback): Adjust.
	* ldlang.h (unique_section_p): Update prototype.
	* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Adjust.
2004-04-30 14:26:09 +00:00
Eric Botcazou 755306bea8 * ld.texinfo (--gc-sections): Remove restriction for
dynamic linking.
2004-04-30 11:49:45 +00:00
Nick Clifton 8a7140c38f Add support for generating DWARF2 debug sections in the x86 PE port 2004-04-29 16:40:20 +00:00
Alan Modra 2f9636ba50 * pe-dll.c: Revert changes accidentally committed 2004-03-08.
(fill_edata): Correct pointer arithmetic.
2004-04-29 13:05:49 +00:00
H.J. Lu 01e91a6c57 Move testsuite ChangeLog entry to testsuite/ChangeLog 2004-04-22 16:42:13 +00:00
H.J. Lu cc2218d563 2004-04-22 H.J. Lu <hongjiu.lu@intel.com>
* ld-i386/tlspic.dd: Updated.
2004-04-22 16:31:47 +00:00
Chris Demetriou 23867d6732 [ bfd/ChangeLog ]
2004-04-21  Chris Demetriou  <cgd@broadcom.com>

	* coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
	* elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
	* bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
	(bfd_mips_elf32_create_embedded_relocs): Remove prototypes
	* bfd-in2.h: Regenerate.

[ ld/ChangeLog ]
2004-04-21  Chris Demetriou  <cgd@broadcom.com>

	* ld.texinfo: Remove MIPS --embedded-relocs documentation.
	* emulparams/elf32bmip.sh (EXTRA_EM_FILE): Remove definition.
	* emulparams/mipsidt.sh (TEMPLATE_NAME): Use generic.em.
	(EXTRA_EM_FILE): Use mipsecoff.em
	* emulparams/mipsidtl.sh (TEMPLATE_NAME): Use generic.em.
	(EXTRA_EM_FILE): Use mipsecoff.em
	* emultempl/mipsecoff.em: Restructure to be included as an
	extra emulation file.
	(check_sections, gld${EMULATION_NAME}_after_open)
	(gld${EMULATION_NAME}_after_allocation)
	(gld${EMULATION_NAME}_get_script)
	(ld_${EMULATION_NAME}_emulation): Remove
	(gld${EMULATION_NAME}_before_parse): Rename to...
	(mipsecoff_before_parse): This.
	(LDEMUL_BEFORE_PARSE): Define.
	* emultempl/mipself.em: Remove file.
	* scripttempl/mips.sc (.rel.sdata): Do not include in output.
	(__runtime_reloc_start, __runtime_reloc_stop): Stop providing
	these symbols.
	* Makefile.am: Remove dependencies on emultempl/mipself.em.
	* Makefile.in: Regenerate.

[ ld/testsuite/ChangeLog ]
2004-04-21  Chris Demetriou  <cgd@broadcom.com>

	* ld-empic/run.c: Removed as part of MIPS --embedded-relocs removal.
	* ld-empic/empic.exp: Likewise.
	* ld-empic/relax.t: Likewise.
	* ld-empic/relax1.c: Likewise.
	* ld-empic/relax2.c: Likewise.
	* ld-empic/relax3.c: Likewise.
	* ld-empic/relax4.c: Likewise.
	* ld-empic/runtest1.c: Likewise.
	* ld-empic/runtest2.c: Likewise.
	* ld-empic/runtesti.s: Likewise.
	* ld-mips-elf/empic1-ln.d: Likewise.
	* ld-mips-elf/empic1-lp.d: Likewise.
	* ld-mips-elf/empic1-mn.d: Likewise.
	* ld-mips-elf/empic1-mp.d: Likewise.
	* ld-mips-elf/empic1-ref.s: Likewise.
	* ld-mips-elf/empic1-sn.d: Likewise.
	* ld-mips-elf/empic1-sp.d: Likewise.
	* ld-mips-elf/empic1-space.s: Likewise.
	* ld-mips-elf/empic1-tgt.s: Likewise.
	* ld-mips-elf/empic2-fwd-0.d: Likewise.
	* ld-mips-elf/empic2-fwd-1.d: Likewise.
	* ld-mips-elf/empic2-fwd-tgt.s: Likewise.
	* ld-mips-elf/empic2-ref.s: Likewise.
	* ld-mips-elf/empic2-rev-0.d: Likewise.
	* ld-mips-elf/empic2-rev-1.d: Likewise.
	* ld-mips-elf/empic2-rev-tgt.s: Likewise.
	* ld-mips-elf/empic2-space.s: Likewise.
	* ld-mips-elf/emrelocs-eb.d: Likewise.
	* ld-mips-elf/emrelocs-el.d: Likewise.
	* ld-mips-elf/emrelocs.ld: Likewise.
	* ld-mips-elf/emrelocs1.s: Likewise.
	* ld-mips-elf/emrelocs2.s: Likewise.
	* ld-mips-elf/mips-elf.exp: Don't run now-removed tests.
2004-04-21 20:52:31 +00:00
Nick Clifton 1502569cf9 Add more documentation about h8300 relaxation. 2004-04-21 10:47:13 +00:00
Hans-Peter Nilsson c894ddfb90 * NEWS: Mention change in DEFINED semantics. 2004-04-21 10:04:02 +00:00
Eric Botcazou a85bf78e2a * scripttempl/elf.sc (.text): Add KEEP for .text.*personality*.
(.data): Add KEEP for .gnu.linkonce.d.*personality*.
	(.gcc_except_table): Add KEEP for self and accept .gcc_except_table.*.
2004-04-21 07:15:05 +00:00
Ben Elliston 58434bc1b4 * ld.texinfo (Simple Example): Add missing punctuation. 2004-04-21 06:08:47 +00:00
Chris Demetriou 7a7f4e42f4 [ gas/ChangeLog ]
2004-04-20  Chris Demetriou  <cgd@broadcom.com>

        * NEWS: Note that MIPS -membedded-pic option is deprecated.

[ ld/ChangeLog ]
2004-04-20  Chris Demetriou  <cgd@broadcom.com>

        * NEWS: Note that MIPS --embedded-relocs option is deprecated.
2004-04-21 00:44:36 +00:00
Jakub Jelinek 3737f867ac * ldlang.c (lang_do_assignments_1): Handle .tbss output section
specially.
2004-04-19 07:35:12 +00:00
Danny Smith 3c17e4f7ec * scriptempl/pe.sc: Put numbered .ctors.* after .ctors
with default priority. Likewise for dtors.
2004-04-17 23:22:49 +00:00
Thiemo Seufer 279500dea9 /bfd/ChangeLog
* config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
	* configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
	targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
	* configure: Regenerate.

	/gas/ChangeLog
	* Makefile.am: Remove mips from aout targets.
	* Makefile.in: Regenerate.
	* configure.in: Remove mips-dec-bsd* target.
	* configure: Regenerate.

	/ld/ChangeLog
	* configure.host: Remove mips*-dec-bsd* target.
	* configure.tgt: Likewise.
2004-04-11 04:07:46 +00:00
Richard Sandiford 52f89c0ab4 * emulparams/elf32bsmip.sh (EXTRA_EM_FILE): Define to irix.
* emulparams/elf64bmip.sh (EXTRA_EM_FILE): Likewise.
	* emulparams/elf32bmipn32.sh (EXTRA_EM_FILE): Likewise.
	* emultempl/irix.em: New file.
	* Makefile.am (eelf32bsmip.c, eelf32bmipn32.c, eelf64bmip.c): Update
	dependencies.
	* Makefile.in: Regenerate.
2004-04-08 14:52:44 +00:00
Paul Brook e489d0aef7 * bfd/bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
* bfd/elf32-arm.h (struct elf32_elf_section_map): New.
	(struct _arm_elf_section_data): New.
	(elf32_arm_section_data): Define.
	(struct elf32_arm_link_hash_table): Add byteswap_code.
	(elf32_arm_link_hash_table_create): Initialize byteswap_code.
	(bfd_elf32_arm_process_before_allocation): Add byteswap_code.
	(elf32_arm_post_process_headers): Set EF_ARM_BE8.
	(elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
	elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
	(bfd_elf32_new_section_hook, elf_backend_write_section,
	elf_backend_link_output_symbol_hook): Define.
	* ld/emultempl/armelf.em (byteswap_code): Add.
	(arm_elf_before_allocation): Pass extra parameter.
	(PARSE_AND_LIST_PROLOGUE): Add OPTION_BE8.
	(PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add be8.
	(PARSE_AND_LIST_ARGS_CASES): Handle OPTION_BE8.
	* ld/emultempl/armelf_oabi.em: Pass extra parameter.
	* ld/ld.texinfo: Document --be8.
2004-04-01 11:20:04 +00:00
Stan Shebs 7cc8057ae4 Remove long-obsolete MPW support.
* mpw-config.in, mpw-make.sed, mac-ld.r: Remove files.
        * Makefile.am (mpw): Remove file-presynthesizing actions.
        * Makefile.in: Likewise.
        * ldfile.c (slash): Remove MPW case.
        * ldlex.l [MPW]: Remove unused definition.
2004-03-30 20:02:04 +00:00
Nick Clifton 0949843db2 Add (linker) support for CR16C processor 2004-03-30 14:04:32 +00:00
Nick Clifton 0a159ef8da Updated Swedish translation 2004-03-30 09:48:30 +00:00
Alan Modra 7a945db630 * emultempl/elf32.em: Update new bfd_elf_discard_info name.
* emultempl/hppaelf.em: Likewise.
	* emultempl/ppc64elf.em: Likewise.
	* emultempl/sh64elf.em: Likewise.
2004-03-27 10:58:35 +00:00
Alan Modra 5a580b3ac2 bfd/
* elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
	and chained shared libs only if dynsym.  Clear dynsym on forced-local.

	* elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
	(bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
	(_bfd_elf_add_dt_needed_tag): Declare.
	(_bfd_elf_sort_symbol): Declare.
	(_bfd_elf_finalize_dynstr): Declare.
	(RELOC_FOR_GLOBAL_SYM): Formatting.
	* elfcode.h (elf_add_dynamic_entry): Delete.
	* elflink.c (_bfd_elf_add_dynamic_entry): New function.  Corresponding
	elflink.h function converted to use elf_size_info.
	(_bfd_elf_add_dt_needed_tag): Likewise.
	(_bfd_elf_sort_symbol): Likewise.
	(_bfd_elf_finalize_dynstr): Likewise.
	(compute_bucket_count): Likewise.
	(bfd_elf_size_dynamic_sections): Likewise.  Check result of
	_bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
	(elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
	* elflink.h: ..here.
	(sort_symbol, add_dt_needed_tag): Delete.
	(elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
	(compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
	Update all users.
	* elf32-arm.h (add_dynamic_entry): Update.  Remove casts.
	* elf32-cris.c (add_dynamic_entry): Likewise.
	* elf32-hppa.c (add_dynamic_entry): Likewise.
	* elf32-i370.c (add_dynamic_entry): Likewise.
	* elf32-i386.c (add_dynamic_entry): Likewise.
	* elf32-m32r.c (add_dynamic_entry): Likewise.
	* elf32-m68k.c (add_dynamic_entry): Likewise.
	* elf32-ppc.c (add_dynamic_entry): Likewise.
	* elf32-s390.c (add_dynamic_entry): Likewise.
	* elf32-sh.c (add_dynamic_entry): Likewise.
	* elf32-sparc.c (add_dynamic_entry): Likewise.
	* elf32-vax.c (add_dynamic_entry): Likewise.
	* elf32-xtensa.c (add_dynamic_entry): Likewise.
	* elf64-alpha.c (add_dynamic_entry): Likewise.
	* elf64-hppa.c (add_dynamic_entry): Likewise.
	* elf64-ppc.c (add_dynamic_entry): Likewise.
	* elf64-s390.c (add_dynamic_entry): Likewise.
	* elf64-sparc.c (add_dynamic_entry): Likewise.
	* elf64-x86-64.c (add_dynamic_entry): Likewise.
	* elfxx-ia64.c (add_dynamic_entry): Likewise.
	* elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
	* elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
	* elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
	* elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
ld/
	* emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Update
	size_dynamic_sections call.
2004-03-25 12:48:45 +00:00
Alan Modra b9cf773d1a include/
PR 51.
	* bfdlink.h (struct bfd_link_info): Add wrap_char.

bfd/
	PR 51.
	* linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.

ld/
	PR 51.
	* emultempl/ppc64elf.em (ppc_create_output_section_statements): Set
	link_info.wrap_char.
2004-03-22 22:58:04 +00:00
H.J. Lu 59c2e50f29 bfd/
2004-03-20  H.J. Lu  <hongjiu.lu@intel.com>

	* elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
	unresolved symbols in objects aren't allowed.

	* elf-hppa.h (elf_hppa_relocate_section): Properly handle
	unresolved symbols.
	(elf_hppa_remark_useless_dynamic_symbols): Likewise.
	(elf_hppa_unmark_useless_dynamic_symbols):
	* elf32-frv.c (elf32_frv_relocate_section): Likewise.
	* elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
	(elf32_hppa_relocate_section): Likewise.
	* elf32-i370.c (i370_elf_relocate_section): Likewise.
	* elf32-m32r.c (m32r_elf_relocate_section): Likewise.
	* elf32-sh.c (sh_elf_relocate_section): Likewise.
	* elf64-sh64.c (sh_elf64_relocate_section): Likewise.
	* elfxx-mips.c (mips_elf_calculate_relocation): Likewise.

	* elf-m10200.c (mn10200_elf_relocate_section): Use
	RELOC_FOR_GLOBAL_SYMBOL.
	* elf32-avr.c (elf32_avr_relocate_section): Likewise.
	* elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
	* elf32-fr30.c (fr30_elf_relocate_section): Likewise.
	* elf32-h8300.c (elf32_h8_relocate_section): Likewise.
	* elf32-i860.c (elf32_i860_relocate_section): Likewise.
	* elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
	* elf32-mcore.c (mcore_elf_relocate_section): Likewise.
	* elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
	* elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
	* elf32-v850.c (v850_elf_relocate_section): Likewise.
	* elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
	* elf64-mmix.c (mmix_elf_relocate_section): Likewise.

include/

2004-03-20  H.J. Lu  <hongjiu.lu@intel.com>

	* bfdlink.h (bfd_link_info): Correct comments for the
	unresolved_syms_in_objects field.

ld/

2004-03-20  H.J. Lu  <hongjiu.lu@intel.com>

	* lexsup.c (parse_args): Don't set unresolved_syms_in_objects
	or unresolved_syms_in_shared_libs for -Bdynamic and -Bstatic.
2004-03-20 23:16:43 +00:00
Alexandre Oliva 44349745f2 * emulparams/elf32frvfd.sh (MAXPAGESIZE): Change to 16Kb. 2004-03-20 05:49:27 +00:00
Alan Modra 81359a70c3 * config.in: Regenerate.
* po/ld.pot: Regenerate.
2004-03-19 07:06:35 +00:00
Alan Modra 4a43e768f1 bfd/
* elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field.  Add
	dyn_lib_class field.  Rearrange for better packing.
	(elf_dt_soname): Delete.
	(elf_dyn_lib_class): Define.
	* elf.c (bfd_elf_set_dt_needed_name): Update comment.
	(bfd_elf_set_dt_needed_soname): Delete.
	(bfd_elf_set_dyn_lib_class): New function.
	* elflink.h (add_dt_needed_tag): New function.  Split out from..
	(elf_link_add_object_symbols): ..here.  Rename "name" to "soname".
	Use elf_dyn_lib_class to set dt_needed and add_needed.  Move fallback
	initialization of soname.
	(elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
	elf_dt_soname.
	* bfd-in.h (enum dynamic_lib_link_class): New.
	(bfd_elf_set_dt_needed_soname): Delete.
	(bfd_elf_set_dyn_lib_class): Declare.
	* bfd-in2.h: Regenerate.
ld/
	* ld.texinfo: Add --as-needed doco.
	* ldmain.c (as_needed): New global var.
	* ldmain.h (as_needed): Declare.
	* lexsup.c (option_values): Add OPTION_AS_NEEDED and
	OPTION_NO_AS_NEEDED.
	(ld_options): Likewise.
	(parse_args): Handle them.
	* ldlang.h (lang_input_statement_type): Add as_needed field.
	* ldlang.c (new_afile): Set p->as_needed.
	* emultempl/elf32.em (gld${EMULATION_NAME}_load_symbols): New function.
	(gld${EMULATION_NAME}_try_needed): Use bfd_elf_set_dyn_lib_class.
	(ld_${EMULATION_NAME}_emulation): Set LDEMUL_RECOGNIZED_FILE entry.

	* ldlang.c (open_input_bfds): Remove useless cast.
	(lang_do_assignments_1): Likewise.
	(lang_for_each_input_section): Delete.
2004-03-18 12:50:20 +00:00
Alan Modra 9183ed4b1b Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*. 2004-03-17 00:46:25 +00:00
Nick Clifton ee31fbd036 Honour PRIVATE keyword 2004-03-08 11:33:59 +00:00
Nathan Sidwell e5caec89a0 * elf.c (map_sections_to_segments): Ignore .tbss sections for
layout purposes.

	* ldlang.c (lang_add_section): Don't force SEC_LOAD on
	SEC_THREAD_LOCAL.
	(IGNORE_SECTION): Ignore .tbss sections too.
	(lang_size_sections_1): .tbss sections do not advance dot.

	* ld-scripts/size.exp: New.
	* ld-scripts/size-[12].{d,s,t}: New.
2004-03-05 11:26:05 +00:00
Andreas Schwab cc2f008e43 * ld.texinfo (Options): Fix example for --wrap. 2004-03-01 17:33:36 +00:00
Danny Smith f5a95868e4 * pe-dll.c (fill_edata): Check that exported_symbol_sections is
not NULL.
2004-02-25 21:00:32 +00:00
Ian Lance Taylor 177b729b44 * ldlang.c (lang_check): Use %P, not %E, in error message. 2004-02-23 19:41:53 +00:00
Nathan Sidwell 1b49374200 * ldlang.h (struct lang_output_section_state): Change processed
field's type.
	* ldexp.c (check, invalid): Remove.
	(fold_name): Move valid_p assignments. Create undefined symbol
	when needed. Directly exampine section's processd flag.
	* ldlang.c (lang_output_section_statement_lookup): Adjust
	processed field init.
	(lang_size_sections_1): Allow LOADADDR when determining section's
	VMA. Adjust error message. Fold data statement's expr.
	(lang_size_sections): Correctly increment lang_statement_iteration.

	* ld-scripts/provide.exp: New.
	* ld-scripts/provide-{1,2,3}.{s,t,d}.exp: New.

	* ldexp.c (fold_tree): Follow indirect symbols.
2004-02-23 10:10:02 +00:00
Nathan Sidwell 876f40905a * ldgram.y (exp): Add two operand ALIGN.
* ldexp.c (fold_binary): Add ALIGN_K case.
	* ld.texinfo (ALIGN): Document two operand version.
	* ld-scripts/align.{s,t,exp}: New.
2004-02-20 15:31:10 +00:00
Nathan Sidwell 384d938fc8 * ldlang.c (map_input_to_output_sections): Initialize sections
mentioned in a data statement expression.
	(lang_do_assignments_1): Add data statement's expression's
	section's vma.
	* ld-scripts/data.{s,t,d,exp}: New.
2004-02-19 14:08:31 +00:00
Nathan Sidwell b6ca8815ef * ldgram.y (statement_anywhere): Add assert rule.
* ldlang.c (exp_init_os): Add assert case.
	* testsuite/ld-scripts/assert.{s,t,exp}: New.
2004-02-18 16:37:21 +00:00
Andrew Cagney c92c35e706 Use bfd_cache_close, instead of accessing bfd->iostream directly. 2004-02-15 02:24:53 +00:00