PATCH/cygwin: Don't pollute namespace with 'end' in ld/scripttempl/pe.sc (take 2]

Danny Smith dannysmith@clear.net.nz
Sun Mar 2 21:35:00 GMT 2003


From: "Ian Lance Taylor" <ian@airs.com>
To: "Danny Smith" <dannysmith@users.sourceforge.net>
Cc: "binutils" <binutils@sources.redhat.com>
Sent: Sunday, 2 March 2003 16:53
Subject: Re: PATCH/cygwin: Don't pollute namespace with 'end' in
ld/scripttempl/pe.sc


> Danny Smith <dannysmith@clear.net.nz> writes:
>
> > The following fixes PR 5563 in the GCC GNATS database:
> > [Cygwin] using a pointer named "end" consistently produces segfault
in
> > windows.
>
> It may be better to use PROVIDE, so that there is some backward
> compatibility.
>
> Ian

Thanks, I didn't know about PROVIDE.

Danny

ld/ChangeLog

2003-03-02  Danny Smith  <dannysmith@users.sourceforge.net>

        * scripttempl/pe.sc: Use PROVIDE with etext, end, _end,


Index: src/ld/scripttempl/pe.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/pe.sc,v
retrieving revision 1.7
diff -c -3 -p -r1.7 pe.sc
*** src/ld/scripttempl/pe.sc 23 Oct 2002 11:21:27 -0000 1.7
--- src/ld/scripttempl/pe.sc 2 Mar 2003 20:51:16 -0000
*************** SECTIONS
*** 60,66 ****
      ${RELOCATING+ *(.fini)}
      /* ??? Why is .gcc_exc here?  */
      ${RELOCATING+ *(.gcc_exc)}
!     ${RELOCATING+ etext = .;}
      *(.gcc_except_table)
    }

--- 60,66 ----
      ${RELOCATING+ *(.fini)}
      /* ??? Why is .gcc_exc here?  */
      ${RELOCATING+ *(.gcc_exc)}
!     ${RELOCATING+PROVIDE (etext = .);}
      *(.gcc_except_table)
    }

*************** SECTIONS
*** 132,139 ****
    .endjunk ${RELOCATING+BLOCK(__section_alignment__)} :
    {
      /* end is deprecated, don't use it */
!     ${RELOCATING+ end = .;}
!     ${RELOCATING+ _end = .;}
      ${RELOCATING+ __end__ = .;}
    }

--- 132,139 ----
    .endjunk ${RELOCATING+BLOCK(__section_alignment__)} :
    {
      /* end is deprecated, don't use it */
!     ${RELOCATING+PROVIDE (end = .);}
!     ${RELOCATING+PROVIDE ( _end = .);}
      ${RELOCATING+ __end__ = .;}
    }






More information about the Binutils mailing list