Andrew Burgess c005eb9e34 ld: Extend options for altering orphan handling behaviour.
Replace the options --warn-orphan and --no-warn-orphan with a single
option --orphan-handling=MODE, where mode can be place, warn, error, and
discard.

Mode 'place' is the default, and is the current behaviour, placing the
orphan section into a suitable output section.

Mode 'warn' is the same as '--warn-orphan'.  The orphan is also placed
using the same algorithm as for 'place'.

Mode 'error' is the same as '--warn-orphan' and '--fatal-warnings'.

Mode 'discard' assigns all output sections to the /DISCARD/ section.

ld/ChangeLog:

	* ld.h (enum orphan_handling_enum): New.
	(ld_config_type): Remove warn_orphan, add orphan_handling.
	* ldemul.c (ldemul_place_orphan): Remove warning about orphan
	sections.
	* ldlang.c (ldlang_place_orphan): New function.
	(lang_place_orphans): Call ldlang_place_orphan.
	* ldlex.h (enum option_values): Remove OPTION_WARN_ORPHAN and
	OPTION_NO_WARN_ORPHAN, add OPTION_ORPHAN_HANDLING.
	* lexsup.c (ld_options): Remove 'warn-orphan' and
	'no-warn-orphan', add 'orphan-handling'.
	(parse_args): Remove handling for OPTION_WARN_ORPHAN and
	OPTION_NO_WARN_ORPHAN, add handling for OPTION_ORPHAN_HANDLING.
	* NEWS: Replace text about --warn-orphan with --orphan-handling.
	* ld.texinfo (Options): Remove --warn-orphan entry and add
	entry on --orphan-handling.
	(Orphan Sections): Add reference to relevant command line options.

ld/testsuite/ChangeLog:

	* ld-elf/elf.exp: Switch to rely on run_dump_test.
	* ld-elf/orphan-5.l: Update expected output.
	* ld-elf/orphan-5.d: New file.
	* ld-elf/orphan-6.d: New file.
	* ld-elf/orphan-6.l: New file.
	* ld-elf/orphan-7.d: New file.
	* ld-elf/orphan-7.map: New file.
	* ld-elf/orphan-8.d: New file.
	* ld-elf/orphan-8.map: New file.
2015-09-04 22:30:55 +01:00
..
2009-09-23 13:54:29 +00:00
2011-11-29 12:42:10 +00:00
2011-11-29 12:42:10 +00:00
2011-11-29 12:42:10 +00:00
2011-11-29 12:42:10 +00:00
2009-08-30 05:48:56 +00:00
2012-07-02 14:40:19 +00:00
2009-09-23 13:54:29 +00:00
2009-09-23 13:54:29 +00:00
2011-02-25 15:53:24 +00:00
2011-02-25 15:53:24 +00:00
2011-02-25 15:53:24 +00:00
2014-10-04 22:49:32 +09:30
2014-10-04 22:49:32 +09:30
2014-10-04 22:49:32 +09:30
2014-10-04 22:49:32 +09:30
2014-10-04 22:49:32 +09:30
2014-12-06 16:45:22 +01:00
2014-12-06 16:45:22 +01:00
2012-11-30 21:14:02 +00:00
2010-05-18 03:31:07 +00:00
2010-05-18 03:31:07 +00:00
2014-12-06 16:45:22 +01:00
2012-07-31 20:45:01 +00:00
2015-02-19 13:36:34 +10:30
2010-02-19 01:47:16 +00:00
2012-07-03 14:44:35 +00:00
2012-07-03 14:44:35 +00:00
2012-07-03 14:44:35 +00:00
2012-07-03 14:44:35 +00:00
2012-07-03 14:44:35 +00:00
2012-07-03 14:44:35 +00:00
2012-07-03 14:44:35 +00:00
2012-07-03 14:44:35 +00:00
2012-07-03 14:44:35 +00:00
2012-07-03 14:44:35 +00:00
2012-07-03 14:44:35 +00:00
2012-07-03 14:44:35 +00:00
2010-12-15 14:56:40 +00:00
2009-10-07 18:33:20 +00:00
2009-10-07 18:33:20 +00:00
2012-12-15 10:28:17 +00:00
2012-12-15 10:28:17 +00:00
2009-08-30 05:48:56 +00:00
2012-12-15 10:28:17 +00:00
2015-02-25 00:15:26 +10:30
2015-02-25 00:15:26 +10:30
2014-03-20 21:18:43 +00:00
2011-02-23 22:37:48 +00:00
2013-02-06 16:21:51 +00:00
2013-02-06 16:21:51 +00:00
2013-02-06 16:21:51 +00:00
2013-02-06 16:21:51 +00:00
2014-01-20 04:50:47 -08:00
2014-01-20 04:50:47 -08:00
2014-01-20 04:50:47 -08:00
2010-01-08 03:03:16 +00:00
2010-01-08 03:03:16 +00:00
2010-01-08 03:03:16 +00:00
2010-01-08 03:03:16 +00:00
2010-01-08 03:03:16 +00:00
2010-03-19 14:49:46 +00:00
2012-03-14 15:56:13 +00:00
2012-03-14 15:56:13 +00:00
2012-03-14 15:56:13 +00:00
2012-05-05 14:15:21 +00:00
2012-05-05 14:15:21 +00:00
2012-07-31 20:45:01 +00:00
2012-05-28 04:08:53 +00:00
2012-05-27 14:45:41 +00:00
2012-05-27 14:45:41 +00:00
2012-07-10 04:51:53 +00:00
2012-07-10 04:51:53 +00:00
2012-08-31 02:52:14 +00:00
2012-08-31 02:52:14 +00:00
2013-03-18 02:47:03 +00:00
2014-12-06 16:45:22 +01:00
2012-12-07 12:32:50 +00:00
2014-01-24 10:01:56 -08:00
2015-01-20 11:12:35 +10:30
2015-01-19 09:23:29 -08:00
2014-01-29 14:30:41 -08:00
2014-01-29 14:30:41 -08:00
2013-03-20 03:44:56 +00:00
2013-03-20 03:44:56 +00:00
2013-03-20 03:44:56 +00:00
2013-02-06 16:21:51 +00:00
2013-02-06 16:21:51 +00:00
2013-02-06 16:21:51 +00:00
2013-02-06 16:21:51 +00:00
2015-07-27 10:11:33 -07:00
2012-10-23 09:33:56 +00:00
2012-10-23 09:33:56 +00:00
2011-05-20 15:33:29 +00:00
2011-05-20 15:33:29 +00:00
2011-01-08 09:38:17 +00:00
2011-01-08 09:38:17 +00:00
2012-12-17 17:20:07 +00:00
2012-12-17 15:37:40 +00:00
2012-12-17 14:53:35 +00:00
2012-07-02 14:40:19 +00:00