This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 0/3] New '--orphan-handling' option.


I've had this patch sitting around for a long time, but looking at the
NEWS file I just spotted that Nick added a similar feature.
  https://sourceware.org/ml/binutils/2015-04/msg00115.html

I'm posting this because I'm not sure if I should drop this version,
or if this offers enough extra value to be worth merging.

Patches #1 and #2 are testing infrastructure changes that could be
merged whatever the verdict on #3 turns out to be.

This patch series replaces the '--warn-orphan' option with an option
'--orphan-handling=MODE', where MODE can take several values,
including 'warn' or 'error'.

The warning message produced under the new scheme includes slightly
more diagnostic output, it includes the name of the section the orphan
has been placed in.

However, I understand that we have a lot of '--warn-X', '--no-warn-X'
style flags already, and we can turn warnings fatal with
'--fatal-warnings', so perhaps this patch does not offer enough to be
worth merging.

Feedback and thoughts welcome.

Thanks,
Andrew

---

Andrew Burgess (3):
  ld: Add file based error/warning regexp for run_dump_test.
  ld: map option for run_dump_test requires no program.
  ld: Extend options for altering orphan handling behaviour.

 ld/ChangeLog                     | 19 ++++++++
 ld/NEWS                          |  6 ++-
 ld/ld.h                          | 23 +++++++++-
 ld/ld.texinfo                    | 44 ++++++++++++++-----
 ld/ldemul.c                      |  4 --
 ld/ldlang.c                      | 74 ++++++++++++++++++++++---------
 ld/ldlex.h                       |  3 +-
 ld/lexsup.c                      | 27 +++++++-----
 ld/testsuite/ChangeLog           | 22 ++++++++++
 ld/testsuite/ld-elf/elf.exp      | 12 -----
 ld/testsuite/ld-elf/orphan-5.d   |  4 ++
 ld/testsuite/ld-elf/orphan-5.l   |  4 +-
 ld/testsuite/ld-elf/orphan-6.d   |  4 ++
 ld/testsuite/ld-elf/orphan-6.l   |  5 +++
 ld/testsuite/ld-elf/orphan-7.d   |  4 ++
 ld/testsuite/ld-elf/orphan-7.map |  7 +++
 ld/testsuite/ld-elf/orphan-8.d   |  4 ++
 ld/testsuite/ld-elf/orphan-8.map |  7 +++
 ld/testsuite/lib/ld-lib.exp      | 95 +++++++++++++++++++++++++++++++++-------
 19 files changed, 286 insertions(+), 82 deletions(-)
 create mode 100644 ld/testsuite/ld-elf/orphan-5.d
 create mode 100644 ld/testsuite/ld-elf/orphan-6.d
 create mode 100644 ld/testsuite/ld-elf/orphan-6.l
 create mode 100644 ld/testsuite/ld-elf/orphan-7.d
 create mode 100644 ld/testsuite/ld-elf/orphan-7.map
 create mode 100644 ld/testsuite/ld-elf/orphan-8.d
 create mode 100644 ld/testsuite/ld-elf/orphan-8.map

-- 
2.4.0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]