This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Changing Stack Frame in x86...
- To: "Jeffrey A. Six" <jeffsix at thecouch dot ncsc dot mil>
- Subject: Re: Changing Stack Frame in x86...
- From: Kathy Bieltz <kbieltz at hal-pc dot org>
- Date: Tue, 10 Jul 2001 09:59:28 -0500
- CC: GNU GCC <gcc-help at gcc dot gnu dot org>
- References: <NEBBIKGJCKMOBMDEBNKLAEDDCAAA.jeffsix@thecouch.ncsc.mil>
Jeffrey,
I'm trying to compile GCC 2.95.3 on RH 7.1 and
my build keeps failing when it trys to make the
./i686-pc-linux-gnu/libiberty directory.
Where did you get the GCC 2.95.3 that you have
running on your RH 7.0 system?
Any pointers you could give to get a working
GCC 2.95.3 on RH 7.1 would be greatly
appreciated.
Thanks!
Kathy Bieltz
"Jeffrey A. Six" wrote:
> I've having some trouble making some modifications to GCC. I'm compiling
> for the x86 architecture running under RedHat Linux 7.0 using GCC 2.95.3.
> Basically, what I want to do is to modify the stack frame generation so that
> at the beginning of each function, an extra 32 bit value is stored on the
> stack, right next to the return address. I have modified the function
> prologue and epilogue code generation routines so that this new value is
> pushed onto the stack before the function's stack frame is setup, so that
> this new value is stored right next to the return address. The epilogue
> pops this new value off right before generating the return instruction. The
> problem is that this screws up passing parameters into functions, as the
> offsets from %esp generated by the compiler are now wrong since I've pushed
> an extra value onto the stack. So, basically I need to modify GCC so that
> it "sees" a 8 byte return address instead of a 4 byte return address, as I'm
> pushing this new value next to the return address at the very beginning of
> every function. I've been playing with the stack frame setup macros in
> i386.h but am not having much luck. Could someone who is more familiar with
> how to do such a thing in GCC tell me what I have to do to make this happen?
> Thanks...
>
> -j6
>
> -------------------------------------------------------------
> Jeffrey A. Six
> jeffsix@thecouch.ncsc.mil
> US Department of Defense
>
> "Staff are requested not to use the eye patches in this
> first-aid kit to impersonate pirates or other characters.
> They are for medical use only."