This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Patch ld saved_script_handle
- To: binutils at sources dot redhat dot com
- Subject: Patch ld saved_script_handle
- From: Tom Rix <trix at redhat dot com>
- Date: Wed, 15 Aug 2001 10:14:35 -0500
- Organization: GCC
ld does not build (at least on aix 4.3.3)
Traced the problem to initializing the variable saved_script_handle in ldgram.y
to false. This patch initializes it to NULL.
Tom
--
Tom Rix
GCC Engineer
trix@redhat.com
256.704.9201
2001-08-15 Tom Rix <trix@redhat.com>
* ldgram.y (saved_script_handle): Initialize to NULL.
* ldmain.c (main): Change check on saved_script_handle.
diff -rcp src-original/ld/ldgram.y src/ld/ldgram.y
*** src-original/ld/ldgram.y Wed Aug 15 07:41:02 2001
--- src/ld/ldgram.y Wed Aug 15 07:41:59 2001
*************** static enum section_type sectype;
*** 50,56 ****
lang_memory_region_type *region;
boolean ldgram_want_filename = true;
! FILE * saved_script_handle = false;
boolean force_make_executable = false;
boolean ldgram_in_script = false;
--- 50,56 ----
lang_memory_region_type *region;
boolean ldgram_want_filename = true;
! FILE * saved_script_handle = NULL;
boolean force_make_executable = false;
boolean ldgram_in_script = false;
diff -rcp src-original/ld/ldmain.c src/ld/ldmain.c
*** src-original/ld/ldmain.c Wed Aug 15 07:41:02 2001
--- src/ld/ldmain.c Wed Aug 15 07:43:37 2001
*************** main (argc, argv)
*** 298,304 ****
/* If we have not already opened and parsed a linker script
read the emulation's appropriate default script. */
! if (saved_script_handle == false)
{
int isfile;
char *s = ldemul_get_script (& isfile);
--- 298,304 ----
/* If we have not already opened and parsed a linker script
read the emulation's appropriate default script. */
! if (saved_script_handle == NULL)
{
int isfile;
char *s = ldemul_get_script (& isfile);