Dan Kegel
Thu Jul 8 16:41:00 GMT 2004

Kulkarni Mrunal-W40371 wrote:
>>I am getting segmentation fault error due to this particular patch 
>>[arm-mcount_internal.patch] while
>>profiling. We are trying to understand it better as to why we need this 
>>patch and what it does. It will be great help if you can tell something 
>>about it. Do we need to add some gcc patch to go with it so that our 
>>profiling will work.
> Anyways- I am using following things
> Gcc 3.3.2
> Glibc-2.3.2
> Glibc-linuxthreads-2.3.2
> Crosstool-0.27
> We want to profile something on ARM7TDMI. 
> For that when you apply -pg option to arm-softfloat-linux-gnu-gcc, 
> it was giving segmentation fault. So we found 
 > [described in ]
> This file on web, and we are trying to apply that patch to the linux-elf.h file. 
> But I don't know how to apply a patch. Because in 
> /crosstool-0.27/patches/gcc-3.3.2 there is a .patches file which 
> already apply patch to the linux-elf.h file. 
> I copied the patch in that file, but I keep getting error, hunk#1 failed. 
> So I don't know basically how to apply a patch. I would love to learn it.

OK, first things first.  When asking for help, it's best to
direct the question to a mailing list rather than directly
to the author. is a good list for
this question; it's also the one the crosstool doc recommends.
When posting to a mailing list, please set your email client to
send plain text and to wrap outgoing mail at 80 columns
(or do it yourself); long lines and HTML mail may get your mail ignored.

Second, has an introduction
to patches which may help.

Third, all the patches in crosstool are diffs from the parent
directory of gcc-x.y, so you'll need to edit that patch
to insert gcc-foo/ in front of the paths before it can be accepted.

Fourth, you might want to check whether that patch is already in
a newer version of gcc, say, gcc-3.3.3 or gcc-3.3.4; it might be
easier to just update than to patch.

Fifth, you should probably use crosstool-0.28-rc28 rather than crosstool-0.27.

Good luck, and please address future questions to the mailing list
rather than to me directly.
- Dan

My technical stuff:
My politics: see for examples of why I'm for regime change

Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list