Commit Graph

80 Commits

Author SHA1 Message Date
Alan Modra e9f5312993 New Cell SPU port. 2006-10-25 06:49:21 +00:00
Alan Modra 74541ad4c0 bfd/
* elf-bfd.h (struct elf_link_hash_table): Reorder.  Add
	text_index_section and data_index_section.
	(struct elf_backend_data): Add elf_backend_init_index_section.
	(_bfd_elf_init_1_index_section): Declare.
	(_bfd_elf_init_2_index_sections): Declare.
	* elfxx-target.h (elf_backend_init_index_section): Define.
	(elfNN_bed): Init new field.
	* elflink.c (_bfd_elf_link_omit_section_dynsym): Keep first tls
	section and text_index_section plus data_index_section.
	(_bfd_elf_link_renumber_dynsyms): Clear dynindx on omitted sections.
	(_bfd_elf_init_1_index_section): New function.
	(_bfd_elf_init_2_index_sections): New function.
	(bfd_elf_size_dynsym_hash_dynstr): Call elf_backend_init_index_section.
	(elf_link_input_bfd): When emitting relocs, use text_index_section
	and data_index_section for removed sections.
	* elf-m10300.c (elf_backend_omit_section_dynsym): Define.
	* elf32-i386.c: Likewise.
	* elf32-m32r.c: Likewise.
	* elf32-sh.c: Likewise.
	* elf32-xstormy16.c: Likewise.
	* elf32-xtensa.c: Likewise.
	* elf64-alpha.c: Likewise.
	* elf64-hppa.c: Likewise.
	* elf64-mmix.c: Likewise.
	* elf64-sh64.c: Likewise.
	* elfxx-ia64.c: Likewise.
	* elf32-arm.c (elf32_arm_final_link_relocate): Use text_index_section
	and data_index_section sym for relocs against sections with no dynamic
	section sym.
	(elf_backend_init_index_section): Define.
	* elf32-cris.c: Similarly.
	* elf32-hppa.c: Similarly.
	* elf32-i370.c: Similarly.
	* elf32-m68k.c: Similarly.
	* elf32-mips.c: Similarly.
	* elf32-ppc.c: Similarly.
	* elf32-s390.c: Similarly.
	* elf32-sparc.c: Similarly.
	* elf32-vax.c: Similarly.
	* elf64-mips.c: Similarly.
	* elf64-ppc.c: Similarly.
	* elf64-s390.c: Similarly.
	* elf64-sparc.c: Similarly.
	* elf64-x86-64.c: Similarly.
	* elfn32-mips.c: Similarly.
	* elfxx-mips.c: Similarly.
	* elfxx-sparc.c: Similarly.
	* linker.c (fix_syms): Base symbols in removed sections on
	previous section in preference to using absolute section.

ld/
	* ldlang.c (strip_excluded_output_sections): Do strip sections
	that define syms, but don't ignore them.
	* ld.texinfo (Output Section Discarding): Revise.
	* emultempl/armcoff.em (gld${EMULATION_NAME}_finish): Always call
	finish_default.

ld/testsuite/
	Update for section sym changes.
2006-10-17 13:41:49 +00:00
H.J. Lu 49c13adb16 bfd/
2006-09-26  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/3223
	PR ld/3267
	* elf.c (assign_file_positions_for_non_load_sections): Don't
	warn zero size allocated sections.

ld/

2006-09-26  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/3223
	PR ld/3267
	* ld.texinfo: Updated Output Section Discarding.

	* ldlang.h (lang_output_section_statement_type): Add
	section_relative_symbol.
	* ldlang.c (strip_excluded_output_sections): Don't strip a
	section with a symbol relative to it.
	(lang_size_sections_1): Mark if an output section has a symbol
	symbol relative to it.

ld/testsuite/

2006-09-26  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/3223
	PR ld/3267
	* ld-scripts/empty-address-1.d: New file.
	* ld-scripts/empty-address-1.s: Likewise.
	* ld-scripts/empty-address-1.t: Likewise.
	* ld-scripts/empty-address-2.s: Likewise.
	* ld-scripts/empty-address-2a.d: Likewise.
	* ld-scripts/empty-address-2a.t: Likewise.
	* ld-scripts/empty-address-2b.d: Likewise.
	* ld-scripts/empty-address-2b.t: Likewise.
	* ld-scripts/empty-address-3.s: Likewise.
	* ld-scripts/empty-address-3a.d: Likewise.
	* ld-scripts/empty-address-3a.t: Likewise.
	* ld-scripts/empty-address-3b.d: Likewise.
	* ld-scripts/empty-address-3b.t: Likewise.
	* ld-scripts/empty-address-3c.d: Likewise.
	* ld-scripts/empty-address-3c.t: Likewise.
	* ld-scripts/empty-address.exp: Likewise.
2006-09-27 04:18:16 +00:00
Nick Clifton 99ad839030 Add x86_64-mingw64 target 2006-09-20 11:35:11 +00:00
H.J. Lu 76052d04e0 2006-09-15 H.J. Lu <hongjiu.lu@intel.com>
* ld-scripts/overlay-size.t: Discard .reginfo sections.
2006-09-15 16:19:33 +00:00
Alan Modra cde9e0be8b ld/
PR 3052
	* ldlang.h (lang_output_section_statement_type): Replace
	"processed" field with "processed_vma" and "processed_lma".
	* ldlang.c (lang_do_assignments_1): Move lma setting code..
	(lang_size_sections_1): ..to here.
	(lang_reset_memory_regions): Adjust for
	lang_output_section_statement_type change.
	* ldexp.c (fold_name): Likewise.

And this is something I forgot the check in from the previous patch.
ld/testsuite/
	* ld-scripts/overlay-size-map.d: Adjust.
2006-08-16 08:31:45 +00:00
H.J. Lu 0d0999db2f ld/
2006-08-08  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/3009
	* ldlang.c (update_wild_statements): Update the whole wild
	section list.

ld/testsuite/

2006-08-08  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/3009
	* ld-scripts/sort.t: New file.
	* ld-scripts/sort_b_a-1.d: Likewise.
	* ld-scripts/sort_b_a-1.s: Likewise.
	* ld-scripts/sort_b_n-1.d: Likewise.
	* ld-scripts/sort_b_n-1.s: Likewise.
2006-08-08 15:07:16 +00:00
Alan Modra a7f651f7f2 * ld-scripts/overlay-size-map.d: Update. 2006-07-26 05:10:05 +00:00
Alan Modra 9e328bda63 * ld-scripts/empty-orphan.d: Update again. 2006-05-19 11:50:31 +00:00
Alan Modra c6f90868f6 * ld-scripts/empty-orphan.t: Discard .reginfo.
* ld-scripts/empty-orphan.d: Update.
2006-05-19 06:10:03 +00:00
Nick Clifton 3c9b82baee Add support for the Z80 processor family 2005-10-25 17:40:19 +00:00
Alan Modra 97e5838e9c * ld-scripts/crossref.exp: Add -mcall-aixdesc to CFLAGS for
powerpc64.
2005-10-18 02:25:42 +00:00
H.J. Lu b239e90902 2005-10-04 H.J. Lu <hongjiu.lu@intel.com>
PR ld/1396
	* ld-scripts/cross3.t: New file.
	* ld-scripts/cross4.c: Likewise.

	* ld-scripts/crossref.exp: Add a new test for "ld -r".
2005-10-04 19:54:08 +00:00
Alan Modra 48733062ff * ld-d10v/default_layout.d: Adjust for section removal.
* ld-elf/empty.s: Define "main".
	* ld-elf/frame.exp: Don't run for hppa64 and v850.
	* ld-elf/group1.d: xfail various targets.
	* ld-elf/merge.d: Likewise.
	* ld-elf/merge2.d: Likewise.
	* ld-elf/warn1.d: Likewise.
	* ld-scripts/defined2.d: Likewise.
	* ld-scripts/defined3.d: Likewise.
	* ld-scripts/empty-aligned.d: Likewise.
	* ld-scripts/size-2.d: Likewise.
	* ld-scripts/weak.exp: Likewise.
	* ld-selective/sel-dump.exp: Likewise.
	* ld-undefined/weak-undef.exp: Likewise.
2005-08-18 07:51:08 +00:00
Alan Modra c17ae8a24e Remove a29k support. 2005-08-18 03:51:51 +00:00
Alan Modra 8bf3b8c251 * ld-elf/empty.s: Define "start".
* ld-elf/merge2.d: xfail arc-*-* and dlx-*-*.
	* ld-scripts/empty-aligned.s: No .data section.
	* ld-scripts/empty-aligned.t: Discard most sections.
	* ld-scripts/empty-aligned.d: Adjust.
2005-08-15 14:08:58 +00:00
Alan Modra bdd87c7744 * ld-scripts/empty-aligned.t: Adjust alignment expressions so
that no .text? section is kept.  Also check setting vma and
	lma.
	* ld-scripts/empty-aligned.d: Update.
2005-06-10 00:44:01 +00:00
Alan Modra 6e81d46e50 * ld-scripts/empty-aligned.d: Adjust. 2005-06-09 02:06:58 +00:00
Zack Weinberg a359509ed3 ld:
* ldlang.c (entry_symbol_default): New file-scope global.
	(lang_finish): Use it, not a hardwired "start".
	(lang_default_entry): Set it.
	* ldlang.h: Declare lang_default_entry.
	* emultempl/beos.em, emultempl/pe.em: Use lang_default_entry,
	not lang_add_entry, to override default entry point symbol.

ld/testsuite:
	* ld-scripts/align.exp: Mark align1 XFAIL on PECOFF targets.
	* ld-scripts/data.exp: Mark data UNSUPPORTED on a.out targets.
	* ld-scripts/provide.exp, ld-scripts/size.exp: Mark all tests
	UNSUPPORTED on a.out targets.  Tidy.
2005-06-01 04:04:19 +00:00
H.J. Lu 75ff45898c bfd/
2005-05-17  H.J. Lu  <hongjiu.lu@intel.com>

	PR 797
	* elf32-i386.c (elf_i386_size_dynamic_sections): Also remove
	empty sdynbss section.
	* elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.

ld/

2005-05-17  H.J. Lu  <hongjiu.lu@intel.com>

	PR 797
	* ldexp.c (exp_fold_tree_1): Renamed from exp_fold_tree and
	take take a bfd_boolean, mark_used. Ignore assert failure if
	mark_used is TRUE.
	(exp_fold_tree) Call exp_fold_tree_1 with mark_used == FALSE.
	(exp_fold_tree_no_dot): Updated to take a bfd_boolean,
	mark_used and pass down.
	(fold_unary): Likewise.
	(fold_binary): Likewise.
	(fold_trinary): Likewise.
	(exp_binop): Add FALSE to call to exp_fold_tree_no_dot.
	(exp_trinop): Likewise.
	(exp_unop): Likewise.
	(exp_nameop): Likewise.
	(exp_get_vma): Likewise.
	(exp_get_fill): Likewise.
	(exp_get_abs_int): Likewise.
	(fold_name): Likewise. Set SEC_KEEP in output section flags.
	(exp_mark_used_section): New.

	* ldexp.h (exp_mark_used_section): New.

	* ldlang.c (lang_output_section_statement_lookup_1): Set the
	ignored field to FALSE.
	(lang_mark_used_section_1): New.
	(lang_mark_used_section): Call lang_mark_used_section_1.
	(strip_excluded_output_sections): Call lang_mark_used_section
	and check for unused sections.
	(lang_size_sections_1): Skip an output section if it should
	be ignored.
	(lang_do_assignments_1): Likewise.
	(lang_process): Don't call lang_mark_used_section here.

	* ldlang.h (lang_output_section_statement_type): Change
	all_input_readonly to bitfield. Add ignored.

ld/testsuite/

2005-05-17  H.J. Lu  <hongjiu.lu@intel.com>

	PR 797
	* empty-aligned.d: New file.
	* empty-aligned.exp: Likewise.
	* empty-aligned.s: Likewise.
	* empty-aligned.t: Likewise.
2005-05-17 16:43:02 +00:00
Nick Clifton 75be928bd2 Update FSF addresses 2005-05-12 07:32:09 +00:00
Alan Modra 52a43e7100 gas/testsuite/
* gas/elf/section5.s: Don't start directives in first column.
ld/testsuite/
	* ld-elf/tbss.s: Don't start directives in first column.
	* ld-scripts/weak1.s: Likewise.
	* ld-scripts/weak2.s: Likewise.
	* ld-undefined/weak-undef.s: Likewise.
	* ld-undefined/undefined.exp: Enable tests for hppa-elf.
2005-03-22 14:20:38 +00:00
Bob Wilson de7f8cc8e0 ld/ChangeLog:
* ldlang.c (IGNORE_SECTION): Remove check for zero size.
        (lang_check_section_addresses): Ignore zero size sections here.
ld/testsuite/ChangeLog:
        * ld-scripts/empty-orphan.d, ld-scripts/empty-orphan.exp,
        ld-scripts/empty-orphan.s, ld-scripts/emtpy-orphan.t: New test.
2005-03-17 16:20:39 +00:00
Alan Modra aef6203bd6 update copyright dates 2005-03-03 11:52:12 +00:00
Alan Modra 2562953678 * ld-elf/warn1.d: Specify -Ttext.
* ld-scripts/align.exp (align2a, align2b: Don't run on aout targets.
	* ld-scripts/align2.t: Discard all but .text and .data.
	* ld-scripts/align2a.d: Accept non-readonly for coff.
	* ld-scripts/align2b.d: Likewise.
	* lib/ld-lib.exp (is_aout_format): New function.
2005-02-21 08:18:49 +00:00
Alan Modra 7921892a2f * ld-scripts/align2a.d: Don't assume anything about section
padding or alignment, or max page size.  Allow 64-bit addresses.
	* ld-scripts/align2b.d: Likewise.
2005-02-18 01:55:16 +00:00
Zack Weinberg fbbb9ac52f * ldexp.c (assigning_to_dot): New global flag.
(fold_name): If assigning_to_dot is true, object immediately to
	an undefined symbol.
	(exp_fold_tree): Set and clear assigning_to_dot around the
	recursive call to exp_fold_tree to process the right-hand side
	of an assignment to the location counter.
testsuite:
	* ld-scripts/align.exp: Rename existing "ALIGN" test to "align1".
	Add dump tests "align2a", "align2b", "align2c".
	* ld-scripts/align2.t, ld-scripts/align2a.s, ld-scripts/align2a.d
	* ld-scripts/align2b.s, ld-scripts/align2b.d
	* ld-scripts/align2c.s, ld-scripts/align2c.d: New files.
2005-02-17 20:57:01 +00:00
Nick Clifton 3ec5763260 Add ORIGIN and LENGTH linker script operators. 2004-11-19 09:31:55 +00:00
Nick Clifton 977cdf5aa7 Fix support for PECOFF weak symbols 2004-11-08 08:12:53 +00:00
Alan Modra 391df1c063 * ld-crx/reloc-num8.d: Adjust for changed orphan placement.
* ld-crx/reloc-num16.d: Likewise.
	* ld-crx/reloc-num32.d: Likewise.
	* ld-scripts/provide-2.t: Start .data at 0x2000.
	* ld-scripts/provide-2.d: Adjust.
2004-10-15 00:27:12 +00:00
H.J. Lu e0255be8fc 2004-10-14 H.J. Lu <hongjiu.lu@intel.com>
* ld-scripts/sort.exp: Run for ELF targets only.
2004-10-14 16:20:47 +00:00
Alan Modra afd7a018c9 ld/
PR 63
	* ldlang.h (lang_output_section_statement_type): Make "next" a
	struct lang_output_section_statement_struct *.
	(struct orphan_save): Move from elf32.em.  Add "name" and "flags".
	(lang_output_section_find_by_flags, lang_insert_orphan): Declare.
	* ldlang.c (lang_output_section_find_1): Adjust for changed
	output_section_statement "next".
	(strip_excluded_output_sections): Likewise.
	(lang_record_phdrs): Likewise.
	(lang_output_section_find_by_flags): New function.
	(output_prev_sec_find): Move from pe.em.  Adjust iterator.
	(lang_insert_orphan): New function.  Tail end of elf32.em's
	place_orphan merged with that from pe.em.  Allow bfd_section to
	be placed first.  New heuristic for placing new output section
	statement in existing script, and accompanying split of __start
	symbol alignment into a separate assignment to dot.
	(lang_add_section): Consistently use output->bfd_section rather than
	an alias, section->output_section.
	(map_input_to_output_sections): Rename overly long arg.  Move
	initialization of data_statement output section to here..
	(lang_check_section_addresses): ..from here.
	(print_assignment): Correct printing of etree_assert.
	(print_all_symbols): Don't bomb if userdata is NULL.
	(IGNORE_SECTION): Rearrange.
	* emultempl/elf32.em (output_rel_find): Adjust interator.
	(output_prev_sec_find): Delete.
	(struct orphan_save): Delete.
	(gld${EMULATION_NAME}_place_orphan): Cater for zero bfd_section
	flags without creating a duplicate output section statement.
	Revise code holding history of various orphan section placements.
	Allow orphan sections to place before script specified output
	sections.  Call lang_output_section_find_by_flags when placement
	by name fails.  Use lang_insert_orphan.
	* emultempl/mmo.em (output_prev_sec_find): Delete.
	(struct orphan_save): Delete.
	(mmo_place_orphan): Revise code holding history of orphan placement.
	Allow orphans to place before existing output sections.  Use
	lang_insert_orphan.
	* emultempl/pe.em (output_prev_sec_find): Delete.
	(struct orphan_save): Delete.
	(gld_${EMULATION_NAME}_place_orphan): Revise to suit use of
	lang_insert_orphan.
ld/testsuite/
	* ld-scripts/overlay-size.d: Update for changed orphan section
	placement.
	* ld-mmix/bpo-18.d: Likewise.
2004-10-14 12:54:47 +00:00
H.J. Lu bcaa7b3eb9 ld/
2004-10-04  H.J. Lu  <hongjiu.lu@intel.com>

	* NEWS: Mention SORT_BY_NAME, SORT_BY_ALIGNMENT and
	--sort-section name|alignment.

	* ld.texinfo: Document SORT_BY_NAME, SORT_BY_ALIGNMENT and
	--sort-section name|alignment.

	* ld.h (sort_type): New enum.
	(wildcard_spec): Change the type of `sorted' to sort_type.

	* ldgram.y (SORT): Removed.
	(SORT_BY_NAME): Added.
	(SORT_BY_ALIGNMENT): Added.
	(wildcard_spec): Updated `sorted'. Handle SORT_BY_NAME and
	SORT_BY_ALIGNMENT.
	(input_section_spec_no_keep): Updated `sorted'.
	(statement): Replace SORT with SORT_BY_NAME.

	* ldlang.c (compare_section): New function to compare 2
	sections with different sorting schemes.
	(wild_sort): Updated. Use compare_section.
	(update_wild_statements): New function.
	(lang_process): Call update_wild_statements before
	map_input_to_output_sections.

	* ldlex.l (SORT_BY_NAME): New.
	(SORT_BY_ALIGNMENT): New.
	(SORT): Return SORT_BY_NAME.

	* ldmain.c (sort_section): New. Defined.
	(main): Initialize it to none.

	* lexsup.c (option_values): Add OPTION_SORT_SECTION.
	(ld_options): Add an entry for OPTION_SORT_SECTION.
	(parse_args): Handle OPTION_SORT_SECTION.

	* mri.c (mri_draw_tree): Updated `sorted'.

ld/testsuite/

2004-10-04  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-scripts/sort.exp: New file for section sorting tests.
	* ld-scripts/sort_b_a.d: Likewise
	* ld-scripts/sort_b_a.s: Likewise
	* ld-scripts/sort_b_a.t: Likewise
	* ld-scripts/sort_b_a_a-1.d: Likewise
	* ld-scripts/sort_b_a_a-2.d: Likewise
	* ld-scripts/sort_b_a_a-3.d: Likewise
	* ld-scripts/sort_b_a_a.t: Likewise
	* ld-scripts/sort_b_a_n-1.d: Likewise
	* ld-scripts/sort_b_a_n-2.d: Likewise
	* ld-scripts/sort_b_a_n-3.d: Likewise
	* ld-scripts/sort_b_a_n.t: Likewise
	* ld-scripts/sort_b_n.d: Likewise
	* ld-scripts/sort_b_n.s: Likewise
	* ld-scripts/sort_b_n.t: Likewise
	* ld-scripts/sort_b_n_a-1.d: Likewise
	* ld-scripts/sort_b_n_a-2.d: Likewise
	* ld-scripts/sort_b_n_a-3.d: Likewise
	* ld-scripts/sort_b_n_a.t: Likewise
	* ld-scripts/sort_b_n_n-1.d: Likewise
	* ld-scripts/sort_b_n_n-2.d: Likewise
	* ld-scripts/sort_b_n_n-3.d: Likewise
	* ld-scripts/sort_b_n_n.t: Likewise
	* ld-scripts/sort_n_a-a.s: Likewise
	* ld-scripts/sort_n_a-b.s: Likewise
	* ld-scripts/sort_no-1.d: Likewise
	* ld-scripts/sort_no-2.d: Likewise
	* ld-scripts/sort_no.t: Likewise
2004-10-04 16:45:51 +00:00
Alan Modra b301b24869 bfd/
* elf.c (IS_LOADED): Define.
	(assign_file_positions_for_segments): Don't round up file offset of
	PT_LOAD segments containing no SEC_LOAD sections, instead round down.
	Delete code handling link script adjustment of lma.  Do the adjust
	in later code handling similar ajustments.  Remove dead code error
	check.  Warn if section lma would require a negative offset
	adjustment.  Tweak lma adjustment to use p_filesz rather than p_memsz.
	Use p_vaddr + p_memsz inside section loop in place of voff.  Don't
	update voff in section loop.  Change voff in segment loop to be an
	adjustment on top of "off".  Set sec->filepos and update "off" later.
	Test for loadable sections consistently using IS_LOADED.  Similarly,
	test for alloc-only sections other than .tbss consistently.
	Don't bother checking SEC_ALLOC in PT_LOAD segments.  Remove FIXME.
	Tidy PT_NOTE handling.  Use %B and %A in error messages.
	(assign_file_positions_except_relocs): Use %B in error message.

ld/testsuite/
	* ld-scripts/overlay-size.d: Don't check .mbss lma.
	* ld-sh/sh64/mix1.xd: Update for changed .bss file offset.
	* ld-sh/sh64/shdl32.xd: Likewise.
	* ld-sh/sh64/shdl64.xd: Likewise.
2004-09-22 06:45:39 +00:00
Alan Modra 2f4a83ee59 * ld-scripts/cross1.t: Remove .opd section spec. 2004-08-17 01:18:50 +00:00
Nick Clifton ed049af3bc Fix for PR 280 - remove duplicated raw insn output fron h8300/h8500 disassemblers 2004-07-22 16:52:43 +00:00
H.J. Lu 08ccf96b08 bfd/
2004-07-22  H.J. Lu  <hongjiu.lu@intel.com>

	* elflink.c (elf_fixup_link_order): Issue a warning and flag
	an error if failed.

ld/

2004-07-22  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-scripts/crossref.exp: XFAIL ia64-*-* on the first test.
2004-07-22 14:19:04 +00:00
H.J. Lu a4b6e8f6a4 gas/
2004-04-14  H.J. Lu  <hongjiu.lu@intel.com>

	* config/tc-generic.c: Add some comments.

ld/testsuite/

2004-04-14  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-scripts/assert.s: Add a newline.
	* ld-scripts/data.s: Likewise.
2004-04-15 01:49:22 +00:00
Alan Modra 76cb62b003 * ld-scripts/align.exp: Don't run on aix.
* ld-scripts/assert.s: Remove comment.
	* ld-scripts/data.s: Likewise.
	* ld-scripts/data.t: Set start address to allow for aout headers.
	Make first LONG pc-relative.
	* ld-scripts/data.d: Update.
	* ld-scripts/defined2.d: Allow other random syms.
	* ld-scripts/defined3.d: Likewise.
	* ld-scripts/provide-1.s: Pad section.
	* ld-scripts/provide-1.t: Set .data address and align.
	* ld-scripts/provide-1.d: Update.
	* ld-scripts/provide-2.s: Pad section.
	* ld-scripts/provide-2.d: Allow random trailing syms.
	* ld-scripts/provide-3.s: Pad section.
	* ld-scripts/provide-3.d: Fix typos.
	* ld-scripts/provide.exp: Don't run on aix.
	* ld-scripts/size-1.s: Simplify test.
	* ld-scripts/size-1.t: Rewrite.
	* ld-scripts/size-1.d: Update.
	* ld-scripts/size-2.s: Simplify.
	* ld-scripts/size-2.t: Set start address.  Set exe flag on image.
	* ld-scripts/size-2.d: Update.
	* ld-scripts/size.exp: Don't run on aix.  Run size-2 on all elf
	targets except mips.
2004-04-08 00:51:37 +00:00
Alan Modra 140cc2404f * ld-scripts/provide-2.d: Ignore random symbols. 2004-03-19 07:14:44 +00:00
Nathan Sidwell 68715859c7 * ld-scripts/size-1.d: Add bigendian regexps.
* ld-scripts/size-2.d: Set --wide for readelf.
2004-03-05 19:27:34 +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
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
Alan Modra 33ed461333 * ld-scripts/data.t: Set ".other" address so location doesn't
depend on target alignment.
	* ld-scripts/data.d: Update.
2004-02-23 09:24:46 +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
Hans-Peter Nilsson 8e91916467 * ld-scripts/defined3.d, ld-scripts/defined3.t: New test.
* ld-scripts/defined.exp: Run defined3.
2003-10-11 09:18:58 +00:00
Hans-Peter Nilsson b8fe28d49f * ld-scripts/defined2.d, ld-scripts/defined2.t: New test.
* ld-scripts/defined.exp: Run defined2.
2003-10-08 12:35:18 +00:00
H.J. Lu 7ed2b4e229 2003-09-29 H.J. Lu <hongjiu.lu@intel.com>
* lib/ld-lib.exp (proc is_elf64): New.

	* ld-scripts/phdrs.exp: Use is_elf_format and is_elf64.
2003-09-30 00:39:57 +00:00