PATCH [Re: unexpected behaviour of ld with --start-group]

Ian Lance Taylor ian@zembu.com
Tue Feb 20 11:35:00 GMT 2001


"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



More information about the Binutils mailing list