bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RS6000] GNU strip fails to strip "gdb" (Was: Re: [RS6000] GNU strip do


From: Christian LESTRADE
Subject: [RS6000] GNU strip fails to strip "gdb" (Was: Re: [RS6000] GNU strip doesn't remove ".debug" section)
Date: Wed, 03 Jul 2002 19:21:37 +0200

This fix doesn't make problems with page alignment on RS6000 architecture.

I think the comment applies on other architecture.

In fact, page alignment on AIX is somewhat weird (see xcoff*.c and *rs6000*).

There is remaining a bug when GNU stripping GNU gdb 5.2 compiled with GCC 3.1.
The stripped executable won't load (with and without this patch).

The "objcopy" utility, when copying "gdb" makes a new "gdb" double in size and with corrupt headers.

I don't know why this problem has only (until now) occurred with "gdb" and not other programs.

At 11:16 02/07/02 +0930, you wrote:
On Fri, Jun 28, 2002 at 10:43:06AM +0200, address@hidden wrote:
> On IBM AIX 5.1 (RS6000) platform, the GNU "strip" program doesn't remove ".debug" sections (unless when using --remove-section=".debug").
>
> I suggest a fix like the following:
> --- binutils-2.12.1/bfd/coffcode.h~   Thu May  9 16:48:49 2002
> +++ binutils-2.12.1/bfd/coffcode.h    Fri Jun 28 10:19:12 2002
> @@ -657,7 +657,7 @@
>  #endif
>          || strncmp (name, ".stab", 5) == 0)
>      {
> -#ifdef COFF_PAGE_SIZE
> +#if defined (COFF_PAGE_SIZE) || defined (RS6000COFF_C)
>        sec_flags |= SEC_DEBUGGING;
>  #endif
>      }

I'm no expert with the coff linker code, but did you see the following
comment in other places where SEC_DEBUGGING is set?

      /* We mark these as SEC_DEBUGGING, but only if COFF_PAGE_SIZE is
        defined.  coff_compute_section_file_positions uses
        COFF_PAGE_SIZE to ensure that the low order bits of the
        section VMA and the file offset match.  If we don't know
        COFF_PAGE_SIZE, we can't ensure the correct correspondence,
        and demand page loading of the file will fail.  */

--
Alan Modra
IBM OzLabs - Linux Technology Centre




reply via email to

[Prev in Thread] Current Thread [Next in Thread]