This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH [Re: unexpected behaviour of ld with --start-group]
- To: "H . J . Lu" <hjl at valinux dot com>
- Subject: Re: PATCH [Re: unexpected behaviour of ld with --start-group]
- From: Ian Lance Taylor <ian at zembu dot com>
- Date: 20 Feb 2001 11:35:10 -0800
- Cc: Bryan White <bryan dot white at rsctech dot com>, Gaya Rime <gaya dot rime at rsctech dot com>, binutils at sourceware dot cygnus dot com
- References: <PNELICDMEDCHEEIEBCGOAEODCAAA.bryan.white@rsctech.com><20010220110502.A8219@valinux.com>
"H . J . Lu" <hjl@valinux.com> writes:
> We have to scan a linker script twice to get the correct behavior.
> "--start-group -lc --end-group" means we have a linker script inside
> another linker script. We didn't handle this case well. With my
> patch, I got
>
> ...
>
> Ian, do you have any comments?
Looks reasonable. I might clear the search_dirs_flag in
ldfile_open_file or ldfile_open_file_search in ldfile.c, to catch all
cases rather than fixing all the emulation files separately. Also,
probably the same bug can occur with careful use of an INPUT
statement, and clearing the flag in ldfile.c would avoid that.
Ian