public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: TOC overflow on linuxppc64
@ 2003-08-29 17:36 Steve Munroe
  2003-08-29 17:42 ` Christoph Hellwig
  0 siblings, 1 reply; 9+ messages in thread
From: Steve Munroe @ 2003-08-29 17:36 UTC (permalink / raw)
  To: Mohammed Tajuddin; +Cc: amodra, gcc, linuxppc64-dev

For compatability with the current SLES 8 and xlc you should use the 
glibc-2.2.5 plus patches from 
ftp://ftp.linuxppc64.org/pub/people/sjmunroe/glibc225-ppc64-20021120.patch

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: TOC overflow on linuxppc64
  2003-08-29 17:36 TOC overflow on linuxppc64 Steve Munroe
@ 2003-08-29 17:42 ` Christoph Hellwig
  2003-08-29 17:46   ` Jakub Jelinek
  2003-09-09  3:22   ` how to access PC Mohammed Tajuddin
  0 siblings, 2 replies; 9+ messages in thread
From: Christoph Hellwig @ 2003-08-29 17:42 UTC (permalink / raw)
  To: Steve Munroe; +Cc: Mohammed Tajuddin, amodra, gcc, linuxppc64-dev

On Fri, Aug 29, 2003 at 10:07:47AM -0500, Steve Munroe wrote:
> For compatability with the current SLES 8 and xlc you should use the 
> glibc-2.2.5 plus patches from 

what about current cvs HEAD?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: TOC overflow on linuxppc64
  2003-08-29 17:42 ` Christoph Hellwig
@ 2003-08-29 17:46   ` Jakub Jelinek
  2003-09-09  3:22   ` how to access PC Mohammed Tajuddin
  1 sibling, 0 replies; 9+ messages in thread
From: Jakub Jelinek @ 2003-08-29 17:46 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Steve Munroe, Mohammed Tajuddin, amodra, gcc, linuxppc64-dev

On Fri, Aug 29, 2003 at 04:21:03PM +0100, Christoph Hellwig wrote:
> On Fri, Aug 29, 2003 at 10:07:47AM -0500, Steve Munroe wrote:
> > For compatability with the current SLES 8 and xlc you should use the 
> > glibc-2.2.5 plus patches from 
> 
> what about current cvs HEAD?

For that you need suitable GCC (e.g. one of):
- gcc-3_2-branch with Alan's patchset
- gcc-3_2-rhl8-branch
- gcc-3_3-branch with Alan's patchset
- gcc-3_3-rhl-branch
- gcc HEAD
recent binutils (CVS, hjl's) and CVS glibc.

	Jakub

^ permalink raw reply	[flat|nested] 9+ messages in thread

* how to access PC
  2003-08-29 17:42 ` Christoph Hellwig
  2003-08-29 17:46   ` Jakub Jelinek
@ 2003-09-09  3:22   ` Mohammed Tajuddin
  2003-09-09  5:21     ` Andrew Pinski
  1 sibling, 1 reply; 9+ messages in thread
From: Mohammed Tajuddin @ 2003-09-09  3:22 UTC (permalink / raw)
  To: linuxppc64-dev; +Cc: amodra, gcc

Hello,

Has anyone tried accessing the program counter on linux powerpc64?  I
notice struct pt_regs defined in ptrace.h, does not contain any place
holder for program counter which is defined on mac-osx for example.
Basically I was trying to access PC, PS from within a program.
Appreciate your feedback.


Regards,
TAJ

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: how to access PC
  2003-09-09  3:22   ` how to access PC Mohammed Tajuddin
@ 2003-09-09  5:21     ` Andrew Pinski
  2003-09-09  6:35       ` Richard Henderson
  0 siblings, 1 reply; 9+ messages in thread
From: Andrew Pinski @ 2003-09-09  5:21 UTC (permalink / raw)
  To: Mohammed Tajuddin; +Cc: linuxppc64-dev, gcc

Try this function:
void * __attribute__((noinline)) getpc()
{
	void *t;
	asm("mflr %0":"=r"(t));
	return t;
}
It might not work always because of sibcalling optimizations but it 
should get you started.

Thanks,
Andrew Pinski



On Monday, September 8, 2003, at 05:03 PM, Mohammed Tajuddin wrote:

> Hello,
>
> Has anyone tried accessing the program counter on linux powerpc64?  I
> notice struct pt_regs defined in ptrace.h, does not contain any place
> holder for program counter which is defined on mac-osx for example.
> Basically I was trying to access PC, PS from within a program.
> Appreciate your feedback.
>
>
> Regards,
> TAJ
>
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: how to access PC
  2003-09-09  5:21     ` Andrew Pinski
@ 2003-09-09  6:35       ` Richard Henderson
  0 siblings, 0 replies; 9+ messages in thread
From: Richard Henderson @ 2003-09-09  6:35 UTC (permalink / raw)
  To: Andrew Pinski; +Cc: Mohammed Tajuddin, linuxppc64-dev, gcc

On Mon, Sep 08, 2003 at 06:26:34PM -0700, Andrew Pinski wrote:
> Try this function:
> void * __attribute__((noinline)) getpc()
> {
> 	void *t;
> 	asm("mflr %0":"=r"(t));
> 	return t;
> }

If you're not going to inline, __builtin_return_address(0) will work.


r~

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: TOC overflow on linuxppc64
  2003-08-29 13:24 ` Alan Modra
@ 2003-09-02 17:25   ` Mohammed Tajuddin
  0 siblings, 0 replies; 9+ messages in thread
From: Mohammed Tajuddin @ 2003-09-02 17:25 UTC (permalink / raw)
  To: Alan Modra; +Cc: linuxppc64-dev, gcc

mainline CVS binutils solved the problem. Thanks a lot. 

Regards,
TAJ

Alan Modra wrote:
> 
> Use mainline CVS binutils.
> 
> --
> Alan Modra
> IBM OzLabs - Linux Technology Centre

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: TOC overflow on linuxppc64
  2003-08-29  9:02 TOC overflow on linuxppc64 Mohammed Tajuddin
@ 2003-08-29 13:24 ` Alan Modra
  2003-09-02 17:25   ` Mohammed Tajuddin
  0 siblings, 1 reply; 9+ messages in thread
From: Alan Modra @ 2003-08-29 13:24 UTC (permalink / raw)
  To: Mohammed Tajuddin; +Cc: linuxppc64-dev, gcc

Use mainline CVS binutils.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

^ permalink raw reply	[flat|nested] 9+ messages in thread

* TOC overflow on linuxppc64
@ 2003-08-29  9:02 Mohammed Tajuddin
  2003-08-29 13:24 ` Alan Modra
  0 siblings, 1 reply; 9+ messages in thread
From: Mohammed Tajuddin @ 2003-08-29  9:02 UTC (permalink / raw)
  To: amodra, linuxppc64-dev, gcc

Hello,

Can someone guide me to fix the problem with TOC overflow on linux
ppc64. After my various attempts building binutils/gcc/glibc following
instructions on linuxppc64.org, I continue to get the same error. 

gnu/local/lib/gcc-lib/powerpc64-linux/3.2.3/crtend.o(.text+0xa): In
function `.__do_global_ctors_aux':
: relocation truncated to fit: R_PPC64_TOC16_DS .toc

I don't have any problems building binutils etc. Somehow I am unable to
get the correct patch although its their on the internet. Following are 
the different versions I have tried so far. 
a. binutils 2.14, gcc 3.2 and glibc 2.3 with the patch
gcc-20030611-ppc64.diff
b. binutils 2.14, gcc 3.1 and glibc 2.3 with the above patch
c. binutils 2.14, gcc 3.3 and glibc 2.3 with the above patch
d. binutils 2.14, gcc 3.2 and glibc 2.2.5 with the above patch
e. binutils 2.14, gcc 3.2 and glibc 2.3 with all the gcc patches on
linuxppc64.org although there were failures while applying the patch.

Appreciate your feedback with the problem of multiple TOC. Please let me
know if anyone has tried, the exact versions of the different tools to
fix this problem. 

Regards,
TAJ

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-09-09  6:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-29 17:36 TOC overflow on linuxppc64 Steve Munroe
2003-08-29 17:42 ` Christoph Hellwig
2003-08-29 17:46   ` Jakub Jelinek
2003-09-09  3:22   ` how to access PC Mohammed Tajuddin
2003-09-09  5:21     ` Andrew Pinski
2003-09-09  6:35       ` Richard Henderson
  -- strict thread matches above, loose matches on Subject: below --
2003-08-29  9:02 TOC overflow on linuxppc64 Mohammed Tajuddin
2003-08-29 13:24 ` Alan Modra
2003-09-02 17:25   ` Mohammed Tajuddin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).