Comment 4 for bug 665598

Revision history for this message
Richard Sandiford (rsandifo) wrote :

Thanks, can reproduce.

The first-order problem is that -T replaces the default linker script, so it needs to specify everything that the default linker script would (except of course for any bits that you're deliberately removing). Attempting to link without any SECTIONS statements at all is unlikely to produce good results, if it works at all. Maybe the bug reporter realised this; I just thought I'd better point it out in case.

Still, I agree this is a bug either way. It's bad error recovery and a bad user interface if nothing else.

FWIW, I tried with:

SEARCH_DIR("/usr/arm-linux-gnueabi/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib");
INSERT AFTER .text;

and got a "bad value" error, which is hardly good either.