public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Don't define USE_PT_GNU_EH_FRAME for uClibc
@ 2007-08-23  9:30 Jie Zhang
  2007-08-23  9:46 ` Andrew Pinski
  2007-08-23 14:50 ` Bernd Schmidt
  0 siblings, 2 replies; 5+ messages in thread
From: Jie Zhang @ 2007-08-23  9:30 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 204 bytes --]

uClibc pretends to be glibc 2.2. But currently it doesn't use 
PT_GNU_EH_FRAME segment. So we cannot define USE_PT_GNU_EH_FRAME and 
have to register and deregister frame info.

Is it OK to commit?


Jie

[-- Attachment #2: crtstuff-uclibc.diff --]
[-- Type: text/x-patch, Size: 800 bytes --]


	* crtstuff.c (USE_PT_GNU_EH_FRAME): Don't define for uClibc.

Index: crtstuff.c
===================================================================
--- crtstuff.c	(revision 127728)
+++ crtstuff.c	(working copy)
@@ -92,7 +92,10 @@ call_ ## FUNC (void)					\
     && !defined(inhibit_libc) && !defined(CRTSTUFFT_O) \
     && defined(__GLIBC__) && __GLIBC__ >= 2
 #include <link.h>
-# if (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
+/* uClibc pretends to be glibc 2.2 and DT_CONFIG is defined in its link.h.
+   But it doesn't use PT_GNU_EH_FRAME ELF segment currently.  */
+# if !defined(__UCLIBC__) \
+     && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
      || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG)))
 #  define USE_PT_GNU_EH_FRAME
 # endif

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

* Re: Don't define USE_PT_GNU_EH_FRAME for uClibc
  2007-08-23  9:30 Don't define USE_PT_GNU_EH_FRAME for uClibc Jie Zhang
@ 2007-08-23  9:46 ` Andrew Pinski
  2007-08-23 12:20   ` Daniel Jacobowitz
  2007-08-23 14:50 ` Bernd Schmidt
  1 sibling, 1 reply; 5+ messages in thread
From: Andrew Pinski @ 2007-08-23  9:46 UTC (permalink / raw)
  To: Jie Zhang; +Cc: GCC Patches

On 8/23/07, Jie Zhang <jzhang918@gmail.com> wrote:
> uClibc pretends to be glibc 2.2. But currently it doesn't use
> PT_GNU_EH_FRAME segment. So we cannot define USE_PT_GNU_EH_FRAME and
> have to register and deregister frame info.

This is wrong, it should never be pretending to be glibc.  This is
just as bad as ICC pretending to be GCC.

-- Pinski

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

* Re: Don't define USE_PT_GNU_EH_FRAME for uClibc
  2007-08-23  9:46 ` Andrew Pinski
@ 2007-08-23 12:20   ` Daniel Jacobowitz
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2007-08-23 12:20 UTC (permalink / raw)
  To: Andrew Pinski; +Cc: Jie Zhang, GCC Patches

On Thu, Aug 23, 2007 at 02:31:39AM -0700, Andrew Pinski wrote:
> On 8/23/07, Jie Zhang <jzhang918@gmail.com> wrote:
> > uClibc pretends to be glibc 2.2. But currently it doesn't use
> > PT_GNU_EH_FRAME segment. So we cannot define USE_PT_GNU_EH_FRAME and
> > have to register and deregister frame info.
> 
> This is wrong, it should never be pretending to be glibc.  This is
> just as bad as ICC pretending to be GCC.

Probably true, but irrelevant to Jie's patch.

-- 
Daniel Jacobowitz
CodeSourcery

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

* Re: Don't define USE_PT_GNU_EH_FRAME for uClibc
  2007-08-23  9:30 Don't define USE_PT_GNU_EH_FRAME for uClibc Jie Zhang
  2007-08-23  9:46 ` Andrew Pinski
@ 2007-08-23 14:50 ` Bernd Schmidt
  2007-08-24  4:06   ` Jie Zhang
  1 sibling, 1 reply; 5+ messages in thread
From: Bernd Schmidt @ 2007-08-23 14:50 UTC (permalink / raw)
  To: Jie Zhang; +Cc: GCC Patches

Jie Zhang wrote:
> uClibc pretends to be glibc 2.2. But currently it doesn't use 
> PT_GNU_EH_FRAME segment. So we cannot define USE_PT_GNU_EH_FRAME and 
> have to register and deregister frame info.
> 
> Is it OK to commit?

Ok, thanks.


Bernd
-- 
This footer brought to you by insane German lawmakers.
Analog Devices GmbH      Wilhelm-Wagenfeld-Str. 6      80807 Muenchen
Sitz der Gesellschaft Muenchen, Registergericht Muenchen HRB 40368
Geschaeftsfuehrer Thomas Wessel, William A. Martin, Margaret Seif

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

* Re: Don't define USE_PT_GNU_EH_FRAME for uClibc
  2007-08-23 14:50 ` Bernd Schmidt
@ 2007-08-24  4:06   ` Jie Zhang
  0 siblings, 0 replies; 5+ messages in thread
From: Jie Zhang @ 2007-08-24  4:06 UTC (permalink / raw)
  To: Bernd Schmidt; +Cc: GCC Patches

Bernd Schmidt wrote:
> Jie Zhang wrote:
>> uClibc pretends to be glibc 2.2. But currently it doesn't use 
>> PT_GNU_EH_FRAME segment. So we cannot define USE_PT_GNU_EH_FRAME and 
>> have to register and deregister frame info.
>>
>> Is it OK to commit?
> 
> Ok, thanks.
> 
Done as r127758.

Jie

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

end of thread, other threads:[~2007-08-24  2:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-23  9:30 Don't define USE_PT_GNU_EH_FRAME for uClibc Jie Zhang
2007-08-23  9:46 ` Andrew Pinski
2007-08-23 12:20   ` Daniel Jacobowitz
2007-08-23 14:50 ` Bernd Schmidt
2007-08-24  4:06   ` Jie Zhang

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).