Fix --section-start=xxxx
This commit is contained in:
parent
52b219b5e4
commit
227aeb0758
|
@ -1,3 +1,7 @@
|
||||||
|
2000-07-08 Alan Modra <alan@linuxcare.com.au>
|
||||||
|
|
||||||
|
* lexsup.c (parse_args): Copy section name.
|
||||||
|
|
||||||
2000-07-07 Charles Wilson <cwilson@ece.gatech.edu>
|
2000-07-07 Charles Wilson <cwilson@ece.gatech.edu>
|
||||||
|
|
||||||
* ld/emultempl/pe.em: institute the following search order for
|
* ld/emultempl/pe.em: institute the following search order for
|
||||||
|
|
13
ld/lexsup.c
13
ld/lexsup.c
|
@ -847,6 +847,8 @@ parse_args (argc, argv)
|
||||||
case OPTION_SECTION_START:
|
case OPTION_SECTION_START:
|
||||||
{
|
{
|
||||||
char *optarg2;
|
char *optarg2;
|
||||||
|
char *sec_name;
|
||||||
|
int len;
|
||||||
|
|
||||||
/* Check for <something>=<somthing>... */
|
/* Check for <something>=<somthing>... */
|
||||||
optarg2 = strchr (optarg, '=');
|
optarg2 = strchr (optarg, '=');
|
||||||
|
@ -869,12 +871,15 @@ parse_args (argc, argv)
|
||||||
xexit (1);
|
xexit (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
optarg2[-1] = '\0';
|
/* We must copy the section name as set_section_start
|
||||||
|
doesn't do it for us. */
|
||||||
|
len = optarg2 - optarg;
|
||||||
|
sec_name = xmalloc (len);
|
||||||
|
memcpy (sec_name, optarg, len - 1);
|
||||||
|
sec_name[len - 1] = 0;
|
||||||
|
|
||||||
/* Then set it... */
|
/* Then set it... */
|
||||||
set_section_start (optarg, optarg2);
|
set_section_start (sec_name, optarg2);
|
||||||
|
|
||||||
optarg2[-1] = '=';
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OPTION_TBSS:
|
case OPTION_TBSS:
|
||||||
|
|
Loading…
Reference in New Issue