This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

current binutils cvs causes problems with libstdc++-v3


I noticed this while doing a current gcc cvs boostrap/test run, and
I can't help but think "linker bug".

When building these tests, the executables end up with one one PT_LOAD
section, marked rwx.  Here is an objdump of the object built from the
17_intro/header_cerrno.cc test:

a.out:     file format elf32-i386
a.out
architecture: i386, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x08048754

Program Header:
    PHDR off    0x00000034 vaddr 0x08048034 paddr 0x08048034 align 2**2
         filesz 0x000000c0 memsz 0x000000c0 flags r-x
  INTERP off    0x000000f4 vaddr 0x080480f4 paddr 0x080480f4 align 2**0
         filesz 0x00000017 memsz 0x00000017 flags r--
    LOAD off    0x00000000 vaddr 0x08048000 paddr 0x08048000 align 2**12
         filesz 0x00005bcc memsz 0x00006434 flags rwx
 DYNAMIC off    0x00005a9c vaddr 0x0804da9c paddr 0x0804da9c align 2**2
         filesz 0x000000b8 memsz 0x000000b8 flags rw-
    NOTE off    0x0000010c vaddr 0x0804810c paddr 0x0804810c align 2**2
         filesz 0x00000018 memsz 0x00000018 flags r--

This certainly seems wrong, as I know there is read-only data in the
executable.  And, because it is wrong, it trips an assertion in NetBSD's
ELF dynamic linker, and thus causes a testsuite failure.

This problem does not happen with binutils 2.12, which makes me think
it is a problem with binutils itself, rather than GCC.

Tomorrow I will try to figure out about when the problem appeared, but
I felt it worthwhile to mention in case anyone has ideas while I sleep :-)

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]