[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Anyone built Emacs with gcc-3.3?
From: |
Paul Eggert |
Subject: |
Re: Anyone built Emacs with gcc-3.3? |
Date: |
Fri, 11 Jul 2003 15:52:41 -0700 (PDT) |
I found the other bug that was preventing Emacs 21.3 from building
with GCC 3.3 on Solaris 8 (sparc). Here is a patch. When I installed
this patch, together with the patch I sent earlier today, Emacs built
and installed on Solaris 8 with GCC 3.3, and ran OK on some simple
tests.
2003-07-11 Paul Eggert <address@hidden>
* unexelf.c (unexec): Consider a section to precede the .bss
section if its addresses overlap that of .bss. This fixes the
bug reported by Simon Marshall in
<http://mail.gnu.org/archive/html/emacs-devel/2003-07/msg00033.html>,
if you also install the patch that I submitted yesterday in
<http://mail.gnu.org/archive/html/emacs-devel/2003-07/msg00207.html>.
This patch is related to my 1996-06-24 patch to unexelf.c
<http://www.geocrawler.com/archives/3/337/1996/6/0/1851704/>,
but it uses a more precise heuristic for deciding when the other
section precedes the .bss section.
--- emacs-21.3/src/unexelf.c 2002-10-15 07:21:44.000000000 -0700
+++ emacs-21.3-fix/src/unexelf.c 2003-07-11 14:59:48.649294000 -0700
@@ -971,8 +971,13 @@ unexec (new_name, old_name, data_start,
}
else
{
- /* Any section that was original placed AFTER the bss
- section should now be off by NEW_DATA2_SIZE. */
+ /* Any section that was originally placed after the .bss
+ section should now be off by NEW_DATA2_SIZE. If a
+ section overlaps the .bss section, consider it to be
+ placed after the .bss section. Overlap can occur if the
+ section just before .bss has less-strict alignment; this
+ was observed between .symtab and .bss on Solaris 2.5.1
+ (sparc) with GCC snapshot 960602. */
#ifdef SOLARIS_POWERPC
/* On PPC Reference Platform running Solaris 2.5.1
the plt section is also of type NOBI like the bss section.
@@ -986,9 +991,8 @@ unexec (new_name, old_name, data_start,
>= OLD_SECTION_H (old_bss_index-1).sh_offset)
NEW_SECTION_H (nn).sh_offset += new_data2_size;
#else
- if (round_up (NEW_SECTION_H (nn).sh_offset,
- OLD_SECTION_H (old_bss_index).sh_addralign)
- >= new_data2_offset)
+ if (NEW_SECTION_H (nn).sh_offset + NEW_SECTION_H (nn).sh_size
+ > new_data2_offset)
NEW_SECTION_H (nn).sh_offset += new_data2_size;
#endif
/* Any section that was originally placed after the section
Re: Anyone built Emacs with gcc-3.3?, Dave Love, 2003/07/08