[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/24576] Feature request: error out when passed the same linker sc
From: |
nickc at redhat dot com |
Subject: |
[Bug ld/24576] Feature request: error out when passed the same linker script with -T and as an object file |
Date: |
Tue, 21 May 2019 15:31:56 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=24576
Nick Clifton <nickc at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nickc at redhat dot com
--- Comment #1 from Nick Clifton <nickc at redhat dot com> ---
(In reply to Julius Werner from comment #0)
Hi Julius,
> I don't think there could ever be a valid use case where you'd want to pass
> the same file as an argument to -T and as an augment linker script later on,
> so could you just add a check to error out somewhere if that happens? That
> could save the people running into this a lot of headache.
This seems like a reasonable request. Would you like to have a go at
implementing the idea yourself and submitting a patch ? [A not so
subtle attempt to get a new contributor interested in the binutils...]
You could record the name of the last linker script parsed with the
-T option by adding code to ld/lexsup.c:parse_args(), and then check
it against the filenames that are processed by ld/ldfile.c:ldfile_try_open_bfd.
If you are feeling particularly clever you could record *all* of the
filenames used with -T as there could be multiple instances of it.
Cheers
Nick
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/24576] New: Feature request: error out when passed the same linker script with -T and as an object file, jwerner at chromium dot org, 2019/05/17
- [Bug ld/24576] Feature request: error out when passed the same linker script with -T and as an object file,
nickc at redhat dot com <=
- [Bug ld/24576] Feature request: error out when passed the same linker script with -T and as an object file, jwerner at chromium dot org, 2019/05/21
- [Bug ld/24576] Feature request: error out when passed the same linker script with -T and as an object file, nickc at redhat dot com, 2019/05/22
- [Bug ld/24576] Feature request: error out when passed the same linker script with -T and as an object file, nickc at redhat dot com, 2019/05/22
- [Bug ld/24576] Feature request: error out when passed the same linker script with -T and as an object file, cvs-commit at gcc dot gnu.org, 2019/05/22
- [Bug ld/24576] Feature request: error out when passed the same linker script with -T and as an object file, nickc at redhat dot com, 2019/05/22
- [Bug ld/24576] Feature request: error out when passed the same linker script with -T and as an object file, jwerner at chromium dot org, 2019/05/22
- [Bug ld/24576] Feature request: error out when passed the same linker script with -T and as an object file, amodra at gmail dot com, 2019/05/22
- [Bug ld/24576] Feature request: error out when passed the same linker script with -T and as an object file, cvs-commit at gcc dot gnu.org, 2019/05/22
- [Bug ld/24576] Feature request: error out when passed the same linker script with -T and as an object file, amodra at gmail dot com, 2019/05/22