This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: naming bounded pointer libraries
- To: Greg McGary <greg at mcgary dot org>
- Subject: Re: naming bounded pointer libraries
- From: "H . J . Lu" <hjl at lucon dot org>
- Date: Fri, 4 Aug 2000 12:00:07 -0700
- Cc: libc-hacker at sourceware dot cygnus dot com, gcc at gcc dot gnu dot org,binutils at sourceware dot cygnus dot com
- References: <200008041842.LAA05151@kayak.mcgary.org>
On Fri, Aug 04, 2000 at 11:42:18AM -0700, Greg McGary wrote:
> [ For background, I recommend the bounded pointers project page
> at http://gcc.gnu.org/projects/bp/main.html ]
>
>
> 3) Drop the suffix and instead install special libraries in a subdir,
> e.g. /usr/lib/libc.a (regular), /usr/lib/bp/libc.a (bounded),
> /usr/lib/prof/libc.a (profiled), and so on for any lib. Now,
> something still must be responsible for directing ld to prefer the
> appropriate subdir. ...
> 3a) Gcc could do it in the specs by passing `-L' options which give
> precedence to the specialized subdirs, also in this case gcc would
> need to assume knowledge of where all the default library dirs
> reside and could no longer assume ld knew where to find
> everything. Any makefile that invokes ld directly would need to
> do that job for itself. ...
> 3b) we could go back to (2) above and introduce an option to ld that
> provides a specialized-library-subdir name which ld could append
> to all dirnames in its library path. Gcc specs could easily propagate
> `-p*' and `-fbounded-pointers' to ld as the appropriate subdir option.
> This is substantially the same as (2)--only the string
> substitution rule on library dir names differs.
>
I added "--multilib-dir PATH" to my binutils years ago for a project I
was working on. Although it was not used later, I felt it might be
useful some day so that I kept it in my binutils. I think you can try
this feature in the Linux binutils. You can do
# gcc -Wl,--multilib-dir,bp -Wl,--verbose .....
to see what the linker does. If it turned out to be useful, I will
submit it to the official binutils.
H.J.