binutils-gdb/ld/testsuite/ld-scripts
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
..
align.exp * ld-scripts/align.exp: Don't run on aix. 2004-04-08 00:51:37 +00:00
align.s * ldgram.y (exp): Add two operand ALIGN. 2004-02-20 15:31:10 +00:00
align.t * ldgram.y (exp): Add two operand ALIGN. 2004-02-20 15:31:10 +00:00
assert.exp * ldgram.y (statement_anywhere): Add assert rule. 2004-02-18 16:37:21 +00:00
assert.s gas/ 2004-04-15 01:49:22 +00:00
assert.t * ldgram.y (statement_anywhere): Add assert rule. 2004-02-18 16:37:21 +00:00
cross1.c 19990502 sourceware import 1999-05-03 07:29:11 +00:00
cross1.t * ld-scripts/cross1.t: Remove .opd section spec. 2004-08-17 01:18:50 +00:00
cross2.c 19990502 sourceware import 1999-05-03 07:29:11 +00:00
cross2.t * ld-checks/checks.exp: .lcomm is incompatible with ppc coff. 2001-08-27 10:49:55 +00:00
cross3.c 19990502 sourceware import 1999-05-03 07:29:11 +00:00
crossref.exp bfd/ 2004-07-22 14:19:04 +00:00
data.d * ld-scripts/align.exp: Don't run on aix. 2004-04-08 00:51:37 +00:00
data.exp * ldlang.c (map_input_to_output_sections): Initialize sections 2004-02-19 14:08:31 +00:00
data.s gas/ 2004-04-15 01:49:22 +00:00
data.t * ld-scripts/align.exp: Don't run on aix. 2004-04-08 00:51:37 +00:00
defined2.d * ld-scripts/align.exp: Don't run on aix. 2004-04-08 00:51:37 +00:00
defined2.t * ld-scripts/defined2.d, ld-scripts/defined2.t: New test. 2003-10-08 12:35:18 +00:00
defined3.d * ld-scripts/align.exp: Don't run on aix. 2004-04-08 00:51:37 +00:00
defined3.t * ld-scripts/defined3.d, ld-scripts/defined3.t: New test. 2003-10-11 09:18:58 +00:00
defined.exp * ld-scripts/defined3.d, ld-scripts/defined3.t: New test. 2003-10-11 09:18:58 +00:00
defined.s 19990502 sourceware import 1999-05-03 07:29:11 +00:00
defined.t 19990502 sourceware import 1999-05-03 07:29:11 +00:00
dynamic-sections-1.s * ld-scripts/dynamic-sections*: New test. 2002-07-09 08:47:24 +00:00
dynamic-sections-2.s * ld-scripts/dynamic-sections*: New test. 2002-07-09 08:47:24 +00:00
dynamic-sections.d * ld-scripts/dynamic-sections*: New test. 2002-07-09 08:47:24 +00:00
dynamic-sections.exp * ld-scripts/dynamic-sections*: New test. 2002-07-09 08:47:24 +00:00
dynamic-sections.t * ld-scripts/dynamic-sections*: New test. 2002-07-09 08:47:24 +00:00
map-address.d * ld-discard/discard.exp: xfail m6812. 2002-08-28 00:11:40 +00:00
map-address.exp * ld-scripts/map-address.exp: Quote conditions. 2002-05-02 16:03:41 +00:00
map-address.t * ld-scripts/map-address.exp: New test. 2002-04-30 09:23:14 +00:00
overlay-size-map.d * lib/ld-lib.exp (run_dump_test): Add -L$srcdir/$subdir. 2002-05-07 11:08:57 +00:00
overlay-size.d bfd/ 2004-09-22 06:45:39 +00:00
overlay-size.exp * lib/ld-lib.exp (run_dump_test): Add -L$srcdir/$subdir. 2002-05-07 11:08:57 +00:00
overlay-size.s * lib/ld-lib.exp (run_dump_test): Add -L$srcdir/$subdir. 2002-05-07 11:08:57 +00:00
overlay-size.t * lib/ld-lib.exp (run_dump_test): Add -L$srcdir/$subdir. 2002-05-07 11:08:57 +00:00
phdrs2.exp * ld-discard/discard.exp, ld-scripts/phdrs.exp, ld-scripts/phdrs2.exp, 2002-07-30 07:41:15 +00:00
phdrs2.s Fix phdrs2 test 2002-06-07 10:30:56 +00:00
phdrs2.t Fix phdrs2 test 2002-06-07 10:30:56 +00:00
phdrs.exp 2003-09-29 H.J. Lu <hongjiu.lu@intel.com> 2003-09-30 00:39:57 +00:00
phdrs.s 19990502 sourceware import 1999-05-03 07:29:11 +00:00
phdrs.t * ld-scripts/phdrs.exp: Fix regexp, s390x is 64 bit platform. 2001-05-01 08:07:35 +00:00
provide-1.d * ld-scripts/align.exp: Don't run on aix. 2004-04-08 00:51:37 +00:00
provide-1.s * ld-scripts/align.exp: Don't run on aix. 2004-04-08 00:51:37 +00:00
provide-1.t * ld-scripts/align.exp: Don't run on aix. 2004-04-08 00:51:37 +00:00
provide-2.d * ld-scripts/align.exp: Don't run on aix. 2004-04-08 00:51:37 +00:00
provide-2.s * ld-scripts/align.exp: Don't run on aix. 2004-04-08 00:51:37 +00:00
provide-2.t * ldlang.h (struct lang_output_section_state): Change processed 2004-02-23 10:10:02 +00:00
provide-3.d * ld-scripts/align.exp: Don't run on aix. 2004-04-08 00:51:37 +00:00
provide-3.s * ld-scripts/align.exp: Don't run on aix. 2004-04-08 00:51:37 +00:00
provide-3.t * ldlang.h (struct lang_output_section_state): Change processed 2004-02-23 10:10:02 +00:00
provide.exp * ld-scripts/align.exp: Don't run on aix. 2004-04-08 00:51:37 +00:00
script.exp TIC4X testcase commit 2002-11-18 08:28:44 +00:00
script.s 19990502 sourceware import 1999-05-03 07:29:11 +00:00
script.t 19990502 sourceware import 1999-05-03 07:29:11 +00:00
scriptm.t 19990502 sourceware import 1999-05-03 07:29:11 +00:00
size-1.d * ld-scripts/align.exp: Don't run on aix. 2004-04-08 00:51:37 +00:00
size-1.s * ld-scripts/align.exp: Don't run on aix. 2004-04-08 00:51:37 +00:00
size-1.t * ld-scripts/align.exp: Don't run on aix. 2004-04-08 00:51:37 +00:00
size-2.d Fix for PR 280 - remove duplicated raw insn output fron h8300/h8500 disassemblers 2004-07-22 16:52:43 +00:00
size-2.s * ld-scripts/align.exp: Don't run on aix. 2004-04-08 00:51:37 +00:00
size-2.t * ld-scripts/align.exp: Don't run on aix. 2004-04-08 00:51:37 +00:00
size.exp * ld-scripts/align.exp: Don't run on aix. 2004-04-08 00:51:37 +00:00
sizeof.exp * config/default.exp (ld_nm): Add "nmflags" arg. 2001-07-24 11:07:16 +00:00
sizeof.s 19990502 sourceware import 1999-05-03 07:29:11 +00:00
sizeof.t 19990502 sourceware import 1999-05-03 07:29:11 +00:00
sort_b_a_a-1.d ld/ 2004-10-04 16:45:51 +00:00
sort_b_a_a-2.d ld/ 2004-10-04 16:45:51 +00:00
sort_b_a_a-3.d ld/ 2004-10-04 16:45:51 +00:00
sort_b_a_a.t ld/ 2004-10-04 16:45:51 +00:00
sort_b_a_n-1.d ld/ 2004-10-04 16:45:51 +00:00
sort_b_a_n-2.d ld/ 2004-10-04 16:45:51 +00:00
sort_b_a_n-3.d ld/ 2004-10-04 16:45:51 +00:00
sort_b_a_n.t ld/ 2004-10-04 16:45:51 +00:00
sort_b_a.d ld/ 2004-10-04 16:45:51 +00:00
sort_b_a.s ld/ 2004-10-04 16:45:51 +00:00
sort_b_a.t ld/ 2004-10-04 16:45:51 +00:00
sort_b_n_a-1.d ld/ 2004-10-04 16:45:51 +00:00
sort_b_n_a-2.d ld/ 2004-10-04 16:45:51 +00:00
sort_b_n_a-3.d ld/ 2004-10-04 16:45:51 +00:00
sort_b_n_a.t ld/ 2004-10-04 16:45:51 +00:00
sort_b_n_n-1.d ld/ 2004-10-04 16:45:51 +00:00
sort_b_n_n-2.d ld/ 2004-10-04 16:45:51 +00:00
sort_b_n_n-3.d ld/ 2004-10-04 16:45:51 +00:00
sort_b_n_n.t ld/ 2004-10-04 16:45:51 +00:00
sort_b_n.d ld/ 2004-10-04 16:45:51 +00:00
sort_b_n.s ld/ 2004-10-04 16:45:51 +00:00
sort_b_n.t ld/ 2004-10-04 16:45:51 +00:00
sort_n_a-a.s ld/ 2004-10-04 16:45:51 +00:00
sort_n_a-b.s ld/ 2004-10-04 16:45:51 +00:00
sort_no-1.d ld/ 2004-10-04 16:45:51 +00:00
sort_no-2.d ld/ 2004-10-04 16:45:51 +00:00
sort_no.t ld/ 2004-10-04 16:45:51 +00:00
sort.exp ld/ 2004-10-04 16:45:51 +00:00
weak1.s 19990502 sourceware import 1999-05-03 07:29:11 +00:00
weak2.s 19990502 sourceware import 1999-05-03 07:29:11 +00:00
weak.exp * lib/ld-lib.exp (run_dump_test): Add -L$srcdir/$subdir. 2002-05-07 11:08:57 +00:00
weak.t 19990502 sourceware import 1999-05-03 07:29:11 +00:00