public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/4356: Exception handling does not work at all for NetBSD/i386ELF target
@ 2001-10-16 14:36 Krister Walfridsson
  0 siblings, 0 replies; 2+ messages in thread
From: Krister Walfridsson @ 2001-10-16 14:36 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/4356; it has been noted by GNATS.

From: Krister Walfridsson <cato@df.lth.se>
To: Richard Henderson <rth@redhat.com>
Cc: <olgerd@pobox.com>, <gcc-gnats@gcc.gnu.org>, <nobody@gcc.gnu.org>,
        <gcc-bugs@gcc.gnu.org>, <gcc-patches@gcc.gnu.org>
Subject: Re: c++/4356: Exception handling does not work at all for NetBSD/i386
 ELF target
Date: Tue, 16 Oct 2001 23:31:23 +0200 (MEST)

 On Tue, 16 Oct 2001, Richard Henderson wrote:
 
 > On Mon, Oct 15, 2001 at 11:25:45PM +0200, Krister Walfridsson wrote:
 > >         * config/i386/netbsd-elf.h (ASM_OUTPUT_ADDR_DIFF_ELT): Define.
 > >         (JUMP_TABLES_IN_TEXT_SECTION): Define.
 >
 > Err..  This has nothing at all to do with exception handling.
 > It has everything to do with switch statements.
 
 Well, in the process of throwing/catching an exception we run some
 code.  Among other, the function read_encoded_value_with_base() in
 eh_personality.cc.  And that function has a switch statment...
 
 Sorry for being unclear about the actual failure in my previous mail.
 
 
 > So what is the actual problem here, given that readonly_data_section
 > will fall back to text_section on a.out systems?
 
 But this is not an a.out system...
 
 Actually I have no clue if JUMP_TABLES_IN_TEXT_SECTION is needed, but
 the FreeBSD ELF version has a comment claiming it is necessary. And
 NetBSD and FreeBSD is nearly identical, so if it is needed by FreeBSD,
 then it is needed by NetBSD too...
 
    /Krister
 


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

* Re: c++/4356: Exception handling does not work at all for NetBSD/i386ELF target
@ 2001-10-15 14:26 Krister Walfridsson
  0 siblings, 0 replies; 2+ messages in thread
From: Krister Walfridsson @ 2001-10-15 14:26 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/4356; it has been noted by GNATS.

From: Krister Walfridsson <cato@df.lth.se>
To: <olgerd@pobox.com>
Cc: <gcc-gnats@gcc.gnu.org>, <nobody@gcc.gnu.org>, <gcc-prs@gcc.gnu.org>,
        <gcc-bugs@gcc.gnu.org>, <gcc-patches@gcc.gnu.org>
Subject: Re: c++/4356: Exception handling does not work at all for NetBSD/i386
 ELF target
Date: Mon, 15 Oct 2001 23:25:45 +0200 (MEST)

 The PR c++/4356 reports that programs dumps core every time an exception is
 thrown. This is because the config file netbsd-elf.h forgets some definitions
 that are necessary for PIC code. This is solved by the patch below.
 
 Bootstrapped and tested on i386-unknown-netbsdelf1.5Y.
 
    /Krister
 
 
 2001-10-15  Krister Walfridsson  <cato@df.lth.se>
 
         * config/i386/netbsd-elf.h (ASM_OUTPUT_ADDR_DIFF_ELT): Define.
         (JUMP_TABLES_IN_TEXT_SECTION): Define.
 
 Index: netbsd-elf.h
 ===================================================================
 RCS file: /cvs/gcc/gcc/gcc/config/i386/netbsd-elf.h,v
 retrieving revision 1.2
 diff -c -3 -p -r1.2 netbsd-elf.h
 *** netbsd-elf.h	2001/10/09 10:16:12	1.2
 --- netbsd-elf.h	2001/10/15 21:05:32
 *************** Boston, MA 02111-1307, USA.  */
 *** 168,173 ****
 --- 168,183 ----
     }
   #endif
 
 + /* This is how to output an element of a case-vector that is relative.
 +    This is only used for PIC code.  */
 + #undef ASM_OUTPUT_ADDR_DIFF_ELT
 + #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
 +   fprintf ((FILE), "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
 +
 + /* Indicate that jump tables go in the text section.  This is
 +    necessary when compiling PIC code.  */
 + #define JUMP_TABLES_IN_TEXT_SECTION (flag_pic)
 +
   /*
    * We always use gas here, so we don't worry about ECOFF assembler problems.
    */
 
 


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

end of thread, other threads:[~2001-10-16 14:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-16 14:36 c++/4356: Exception handling does not work at all for NetBSD/i386ELF target Krister Walfridsson
  -- strict thread matches above, loose matches on Subject: below --
2001-10-15 14:26 Krister Walfridsson

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