bug-binutils
[Top][All Lists]
Advanced

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

[Bug binutils/2995] New: objcopy and strip of finally linked executables


From: r dot emrich at de dot tecosim dot com
Subject: [Bug binutils/2995] New: objcopy and strip of finally linked executables fails
Date: 3 Aug 2006 13:02:29 -0000

given the minimal C program main.c:

int main()
{
}

$ gcc -c -o main.o main.c
$ objcopy  main.o test.o
$ nm test.o 
0000000000000000 T main
$ strip test.o
$ nm test.o
nm: test.o: no symbols
$ gcc -o main main.o
$ objcopy main test
BFD: sta03759: section .data lma 0x8000000100000000 overlaps previous sections
BFD: sta03759: section .ctors lma 0x8000000100000148 overlaps previous sections
BFD: sta03759: section .dtors lma 0x8000000100000158 overlaps previous sections
BFD: sta03759: section .init lma 0x8000000100000168 overlaps previous sections
BFD: sta03759: section .init_array lma 0x8000000100000178 overlaps previous 
sections
BFD: sta03759: section .fini lma 0x8000000100000188 overlaps previous sections
BFD: sta03759: section .fini_array lma 0x8000000100000190 overlaps previous 
sections
BFD: sta03759: section .eh_frame lma 0x8000000100000198 overlaps previous 
sections
BFD: sta03759: section .jcr lma 0x80000001000003d0 overlaps previous sections
BFD: sta03759: section .data.rel.local lma 0x80000001000003d8 overlaps previous
sections
BFD: sta03759: section .data.rel.ro lma 0x80000001000003e0 overlaps previous
sections
BFD: sta03759: section .plt lma 0x8000000100000400 overlaps previous sections
BFD: sta03759: section .dlt lma 0x8000000100000430 overlaps previous sections
BFD: sta03759: section .sdata lma 0x80000001000005b8 overlaps previous sections
BFD: sta03759: warning: allocated section `$UNWIND$' not in segment
BFD: sta03759: warning: allocated section `$UNWIND$MILLICODE$' not in segment
BFD: sta03759: warning: allocated section `.PARISC.pfa_counter' not in segment
BFD: sta03759: warning: allocated section `.PARISC.global' not in segment
BFD: sta03759: warning: allocated section `.HP.init' not in segment
BFD: sta03759: warning: allocated section `.preinit' not in segment
BFD: sta03759: warning: allocated section `.sbss' not in segment
BFD: sta03759: warning: allocated section `.hbss' not in segment
BFD: sta03759: warning: allocated section `.tbss' not in segment
objcopy: sta03759: File too large
objcopy: sta03759: File too large
$
$
$ strip main
BFD: sta07628: section .data lma 0x8000000100000000 overlaps previous sections
BFD: sta07628: section .ctors lma 0x8000000100000148 overlaps previous sections
BFD: sta07628: section .dtors lma 0x8000000100000158 overlaps previous sections
BFD: sta07628: section .init lma 0x8000000100000168 overlaps previous sections
BFD: sta07628: section .init_array lma 0x8000000100000178 overlaps previous 
sections
BFD: sta07628: section .fini lma 0x8000000100000188 overlaps previous sections
BFD: sta07628: section .fini_array lma 0x8000000100000190 overlaps previous 
sections
BFD: sta07628: section .eh_frame lma 0x8000000100000198 overlaps previous 
sections
BFD: sta07628: section .jcr lma 0x80000001000003d0 overlaps previous sections
BFD: sta07628: section .data.rel.local lma 0x80000001000003d8 overlaps previous
sections
BFD: sta07628: section .data.rel.ro lma 0x80000001000003e0 overlaps previous
sections
BFD: sta07628: section .plt lma 0x8000000100000400 overlaps previous sections
BFD: sta07628: section .dlt lma 0x8000000100000430 overlaps previous sections
BFD: sta07628: section .sdata lma 0x80000001000005b8 overlaps previous sections
BFD: sta07628: warning: allocated section `$UNWIND$' not in segment
BFD: sta07628: warning: allocated section `$UNWIND$MILLICODE$' not in segment
BFD: sta07628: warning: allocated section `.PARISC.pfa_counter' not in segment
BFD: sta07628: warning: allocated section `.PARISC.global' not in segment
BFD: sta07628: warning: allocated section `.HP.init' not in segment
BFD: sta07628: warning: allocated section `.preinit' not in segment
BFD: sta07628: warning: allocated section `.sbss' not in segment
BFD: sta07628: warning: allocated section `.hbss' not in segment
BFD: sta07628: warning: allocated section `.tbss' not in segment
strip: sta07628: File too large
strip: sta07628: File too large
$
$
$


The binutils testsuite shows two similiar failures:
FAIL: simple objcopy of executable
FAIL: run objcopy of executable

The binutils.log contains:
Executing on host: gcc  -c  -o testglue.o
/appl/shared/gnu/HP-UX/hppa64-hp-hpux11.00/share/dejagnu/testglue.c    (timeout
= 300)
/appl/shared/gnu/HP-UX/hppa64-hp-hpux11.00/share/dejagnu/testglue.c: In function
'__wrap_abort':
/appl/shared/gnu/HP-UX/hppa64-hp-hpux11.00/share/dejagnu/testglue.c:126:
warning: incompatible implicit declaration of built-in function 'abort'
/appl/shared/gnu/HP-UX/hppa64-hp-hpux11.00/share/dejagnu/testglue.c: In function
'__wrap_main':
/appl/shared/gnu/HP-UX/hppa64-hp-hpux11.00/share/dejagnu/testglue.c:142:
warning: incompatible implicit declaration of built-in function 'exit'
output is:
/appl/shared/gnu/HP-UX/hppa64-hp-hpux11.00/share/dejagnu/testglue.c: In function
'__wrap_abort':
/appl/shared/gnu/HP-UX/hppa64-hp-hpux11.00/share/dejagnu/testglue.c:126:
warning: incompatible implicit declaration of built-in function 'abort'
/appl/shared/gnu/HP-UX/hppa64-hp-hpux11.00/share/dejagnu/testglue.c: In function
'__wrap_main':
/appl/shared/gnu/HP-UX/hppa64-hp-hpux11.00/share/dejagnu/testglue.c:142:
warning: incompatible implicit declaration of built-in function 'exit'

Executing on host: gcc
/raid/tecosim/it/devel/projects/develtools/src/binutils-2.17/binutils/testsuite/binutils-all/testprog.c
  -g  -lm   -o tmpdir/testprog    (timeout =
 300)
Setting LD_LIBRARY_PATH to
:/appl/shared/gcc/HP-UX/hppa64-hp-hpux11.00/gcc-4.1.1/lib:/appl/shared/gnu/HP-UX/hppa64-hp-hpux11.00/lib:
ok
/disk1/SCRATCH/tmp/binutils/binutils/objcopy  tmpdir/testprog tmpdir/copyprog
Executing on host: /disk1/SCRATCH/tmp/binutils/binutils/objcopy  tmpdir/testprog
tmpdir/copyprog   (timeout = 300)
BFD: tmpdir/copyprog: section .data lma 0x8000000100000000 overlaps previous
sections
BFD: tmpdir/copyprog: section .ctors lma 0x8000000100000158 overlaps previous
sections
BFD: tmpdir/copyprog: section .dtors lma 0x8000000100000168 overlaps previous
sections
BFD: tmpdir/copyprog: section .init lma 0x8000000100000178 overlaps previous
sections
BFD: tmpdir/copyprog: section .init_array lma 0x8000000100000188 overlaps
previous sections
BFD: tmpdir/copyprog: section .fini lma 0x8000000100000198 overlaps previous
sections
BFD: tmpdir/copyprog: section .fini_array lma 0x80000001000001a0 overlaps
previous sections
BFD: tmpdir/copyprog: section .eh_frame lma 0x80000001000001a8 overlaps previous
sections
BFD: tmpdir/copyprog: section .jcr lma 0x80000001000003e0 overlaps previous 
sections
BFD: tmpdir/copyprog: section .data.rel.local lma 0x80000001000003e8 overlaps
previous sections
BFD: tmpdir/copyprog: section .data.rel.ro lma 0x80000001000003f0 overlaps
previous sections
BFD: tmpdir/copyprog: section .plt lma 0x8000000100000410 overlaps previous 
sections
BFD: tmpdir/copyprog: section .dlt lma 0x8000000100000460 overlaps previous 
sections
BFD: tmpdir/copyprog: section .sdata lma 0x8000000100000620 overlaps previous
sections
BFD: tmpdir/copyprog: warning: allocated section `$UNWIND$' not in segment
BFD: tmpdir/copyprog: warning: allocated section `$UNWIND$MILLICODE$' not in 
segment
BFD: tmpdir/copyprog: warning: allocated section `.PARISC.pfa_counter' not in
segment
BFD: tmpdir/copyprog: warning: allocated section `.PARISC.global' not in segment
BFD: tmpdir/copyprog: warning: allocated section `.HP.init' not in segment
BFD: tmpdir/copyprog: warning: allocated section `.preinit' not in segment
BFD: tmpdir/copyprog: warning: allocated section `.hbss' not in segment
BFD: tmpdir/copyprog: warning: allocated section `.tbss' not in segment
/disk1/SCRATCH/tmp/binutils/binutils/objcopy: tmpdir/copyprog: File too large
/disk1/SCRATCH/tmp/binutils/binutils/objcopy: tmpdir/copyprog: File too large
BFD: tmpdir/copyprog: section .data lma 0x8000000100000000 overlaps previous
sections
BFD: tmpdir/copyprog: section .ctors lma 0x8000000100000158 overlaps previous
sections
BFD: tmpdir/copyprog: section .dtors lma 0x8000000100000168 overlaps previous
sections
BFD: tmpdir/copyprog: section .init lma 0x8000000100000178 overlaps previous
sections
BFD: tmpdir/copyprog: section .init_array lma 0x8000000100000188 overlaps
previous sections
BFD: tmpdir/copyprog: section .fini lma 0x8000000100000198 overlaps previous
sections
BFD: tmpdir/copyprog: section .fini_array lma 0x80000001000001a0 overlaps
previous sections
BFD: tmpdir/copyprog: section .eh_frame lma 0x80000001000001a8 overlaps previous
sections
BFD: tmpdir/copyprog: section .jcr lma 0x80000001000003e0 overlaps previous 
sections
BFD: tmpdir/copyprog: section .data.rel.local lma 0x80000001000003e8 overlaps
previous sections
BFD: tmpdir/copyprog: section .data.rel.ro lma 0x80000001000003f0 overlaps
previous sections
BFD: tmpdir/copyprog: section .plt lma 0x8000000100000410 overlaps previous 
sections
BFD: tmpdir/copyprog: section .dlt lma 0x8000000100000460 overlaps previous 
sections
BFD: tmpdir/copyprog: section .sdata lma 0x8000000100000620 overlaps previous
sections
BFD: tmpdir/copyprog: warning: allocated section `$UNWIND$' not in segment
BFD: tmpdir/copyprog: warning: allocated section `$UNWIND$MILLICODE$' not in 
segment
BFD: tmpdir/copyprog: warning: allocated section `.PARISC.pfa_counter' not in
segment
BFD: tmpdir/copyprog: warning: allocated section `.PARISC.global' not in segment
BFD: tmpdir/copyprog: warning: allocated section `.HP.init' not in segment
BFD: tmpdir/copyprog: warning: allocated section `.preinit' not in segment
BFD: tmpdir/copyprog: warning: allocated section `.hbss' not in segment
BFD: tmpdir/copyprog: warning: allocated section `.tbss' not in segment
/disk1/SCRATCH/tmp/binutils/binutils/objcopy: tmpdir/copyprog: File too large
/disk1/SCRATCH/tmp/binutils/binutils/objcopy: tmpdir/copyprog: File too large

FAIL: simple objcopy of executable
FAIL: run objcopy of executable



A testcase for stripping executables is not provided as AFAIS. I checked the
binutils.log
So I think it's a good idea to add one.

Rainer

-- 
           Summary: objcopy and strip of finally linked executables fails
           Product: binutils
           Version: 2.17
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: r dot emrich at de dot tecosim dot com
                CC: bug-binutils at gnu dot org,r dot emrich at de dot
                    tecosim dot com
 GCC build triplet: hppa64-hp-hpux11.00
  GCC host triplet: hppa64-hp-hpux11.00
GCC target triplet: hppa64-hp-hpux11.00


http://sourceware.org/bugzilla/show_bug.cgi?id=2995

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




reply via email to

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