delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1996/12/17/11:18:31

From: scottc AT net-community DOT com (Scott Christley)
Subject: Re: libgcc.a (Undefined Reference to VirtualProtect)
17 Dec 1996 11:18:31 -0800 :
Sender: daemon AT cygnus DOT com
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <199612171325.FAA05303.cygnus.gnu-win32@stetson.net-community.com>
Mime-Version: 1.0
X-Sender: scottc AT net-community DOT com
X-Mailer: Windows Eudora Light Version 1.5.2
Original-To: Raja <raja AT zsp DOT com>, gnu-win32 AT cygnus DOT com
Original-Cc: raja AT zsp DOT com
Original-Sender: owner-gnu-win32 AT cygnus DOT com

Raja,

You need to apply this patch to libgcc2.c and recompile libgcc.a within GCC;
the program does not get the proper prototype for VirtualProtect().

Index: libgcc2.c
===================================================================
RCS file: /MBCD/Repository/gcc-cygnus/libgcc2.c,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 libgcc2.c
*** libgcc2.c   1996/12/10 15:42:43     1.1.1.1
--- libgcc2.c   1996/12/12 15:05:44
***************
*** 2781,2787 ****
  /* Jump to a trampoline, loading the static chain address.  */

  #ifdef WINNT
!
  long getpagesize()
  {
  #ifdef _ALPHA_
--- 2781,2787 ----
  /* Jump to a trampoline, loading the static chain address.  */

  #ifdef WINNT
! #include <windows.h>
  long getpagesize()
  {
  #ifdef _ALPHA_

Scott

At 10:28 PM 12/16/96 -0800, Raja wrote:
>HI all,
>I am trying to build binutils-2.6 with new beta17.1 Cygnus Toolkit.
>When it is trying to link  I am getting some error like this.
>I am linking my own built libraries for my assembler. I use the same 
>makefile with DJGPP and it seemed to compiled and linked fine atleast.
>Am I missing something here? 
>Any help would be greatly appreciated.
>
>****This is the make command*****
>
>gcc   -g    -o as.new targ-cpu.o obj-format.o atof-targ.o app.o as.o 
>atof-generic.o bignum-copy.o cond.o expr.o flonum-konst.o flonum-copy.o 
>flonum-mult.o frags.o hash.o input-file.o input-scrub.o literal.o
messages.o output-file.o 
>read.o subsegs.o symbols.o write.o listing.o ecoff.o stabs.o sb.o macro.o  
>../opcodes/libopcodes.a ../bfd/libbfd.a  ../libiberty/libiberty.a
>*****
>
>***This is the error I got****
>beta17.1.C:\CYGNUS\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32/cygnus-2.7.2-9
61023/libgcc.a
>(_trampoline.o): In function `mprotect':
>/pizza/mushroom/noer/beta17/src/gcc/libgcc2.c(.text+0x67): undefined 
>reference t
>o `VirtualProtect'
>MAKE.EXE: *** [as.new] Error 1
>
>
>
>Thanks in Advance,
>Raja
>-
>For help on using this list, send a message to
>"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
>

-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019