[Bug 615765] Re: Host strip corrupts cross-built armel archives

Marcin Juszkiewicz 615765 at bugs.launchpad.net
Fri May 31 09:59:13 UTC 2013


** Changed in: binutils (Ubuntu Maverick)
       Status: New => Won't Fix

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to binutils in Ubuntu.
https://bugs.launchpad.net/bugs/615765

Title:
  Host strip corrupts cross-built armel archives

Status in Linaro Binutils:
  Triaged
Status in “binutils” package in Ubuntu:
  Won't Fix
Status in “binutils” source package in Maverick:
  Won't Fix

Bug description:
  Binary package hint: binutils

  $ ls -lrt /var/cache/apt/archives/binutils*
  -rw-r--r-- 1 root root 2204364 2010-07-11 09:05 /var/cache/apt/archives/binutils_2.20.51.20100710-1ubuntu2_i386.deb
  -rw-r--r-- 1 root root 6163090 2010-07-20 08:38 /var/cache/apt/archives/binutils-arm-linux-gnueabi_2.20.51.20100710-1ubuntu2hrw1_i386.deb

  $ strip --version
  GNU strip (GNU Binutils for Ubuntu) 2.20.51-system.20100710

  $ ls -lrt /var/cache/apt/archives | grep gnueabi
  -rw-r--r-- 1 root root 6163090 2010-07-20 08:38 binutils-arm-linux-gnueabi_2.20.51.20100710-1ubuntu2hrw1_i386.deb
  -rw-r--r-- 1 root root  121718 2010-08-04 11:14 gcc-4.4-arm-linux-gnueabi-base_4.4.4-8ubuntu1hrw1_i386.deb
  -rw-r--r-- 1 root root 3548230 2010-08-04 11:15 cpp-4.4-arm-linux-gnueabi_4.4.4-8ubuntu1hrw1_i386.deb
  -rw-r--r-- 1 root root  704076 2010-08-04 11:15 gcc-4.4-arm-linux-gnueabi_4.4.4-8ubuntu1hrw1_i386.deb
  -rw-r--r-- 1 root root  119156 2010-08-04 11:30 gcc-4.5-arm-linux-gnueabi-base_4.5.1-1ubuntu1hrw1_i386.deb

  cat /etc/apt/sources.list

  deb mirror://mirrors.ubuntu.com/mirrors.txt maverick main restricted universe multiverse   
  deb-src mirror://mirrors.ubuntu.com/mirrors.txt maverick main restricted universe multiverse

  deb http://people.canonical.com/~hrw/ubuntu-maverick-armel-cross-compilers/ ./ 
  deb-src http://people.canonical.com/~hrw/ubuntu-maverick-armel-cross-compilers/ ./ 

  $ arm-linux-gnueabi-gcc --version
  arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.4.4-8ubuntu1hrw1) 4.4.5 20100728 (prerelease)

  $ cat test.c
  int main (int argc, char** argv)
  {
  	return 0;
  }

  $ arm-linux-gnueabi-gcc -o test.o test.c
  $ ls -l test.o
  -rwxr-xr-x 1 chroot-user chroot-user 4693 2010-08-10 08:25 test.o

  $ arm-linux-gnueabi-ar  rc my.a test.o
  $ ls -l my.a
  -rw-r--r-- 1 chroot-user chroot-user 5072 2010-08-10 08:26 my.a
  $ readelf -h my.a

  File: my.a(test.o)
  ELF Header:
    Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 
    Class:                             ELF32
    Data:                              2's complement, little endian
    Version:                           1 (current)
    OS/ABI:                            UNIX - System V
    ABI Version:                       0
    Type:                              EXEC (Executable file)
    Machine:                           ARM
    Version:                           0x1
    Entry point address:               0x82b9
    Start of program headers:          52 (bytes into file)
    Start of section headers:          1644 (bytes into file)
    Flags:                             0x5000002, has entry point, Version5 EABI
    Size of this header:               52 (bytes)
    Size of program headers:           32 (bytes)
    Number of program headers:         8
    Size of section headers:           40 (bytes)
    Number of section headers:         29
    Section header string table index: 26

  $ strip my.a
  $ readelf -h my.a

  File: my.a(test.o)
  ELF Header:
    Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 
    Class:                             ELF32
    Data:                              2's complement, little endian
    Version:                           1 (current)
    OS/ABI:                            UNIX - System V
    ABI Version:                       0
    Type:                              EXEC (Executable file)
    Machine:                           None			** Changed **
    Version:                           0x1
    Entry point address:               0x82b9
    Start of program headers:          52 (bytes into file)
    Start of section headers:          1628 (bytes into file)
    Flags:                             0x5000002
    Size of this header:               52 (bytes)
    Size of program headers:           32 (bytes)
    Number of program headers:         8
    Size of section headers:           40 (bytes)
    Number of section headers:         27
    Section header string table index: 26

  $ ls -l my.a
  -rw-r--r-- 1 chroot-user chroot-user 2840 2010-08-10 08:27 my.a

  binutils-multiarch/strip does not exhibit this behaviour.

  $ sudo apt-get install binutils-multiarch
  ......

  $ arm-linux-gnueabi-gcc -o test.o test.c
  $ arm-linux-gnueabi-ar  rc my.a test.o
  $ strip my.a
  $ readelf -h my.a

  File: my.a(test.o)
  ELF Header:
    Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 
    Class:                             ELF32
    Data:                              2's complement, little endian
    Version:                           1 (current)
    OS/ABI:                            UNIX - System V
    ABI Version:                       0
    Type:                              EXEC (Executable file)
    Machine:                           ARM
    Version:                           0x1
    Entry point address:               0x82b9
    Start of program headers:          52 (bytes into file)
    Start of section headers:          1628 (bytes into file)
    Flags:                             0x5000002, has entry point, Version5 EABI
    Size of this header:               52 (bytes)
    Size of program headers:           32 (bytes)
    Number of program headers:         8
    Size of section headers:           40 (bytes)
    Number of section headers:         27
    Section header string table index: 26

  $ ls -l my.a
  -rw-r--r-- 1 chroot-user chroot-user 2840 2010-08-10 08:44 my.a

  Debian http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=211052 may be
  relevant.

To manage notifications about this bug go to:
https://bugs.launchpad.net/binutils-linaro/+bug/615765/+subscriptions




More information about the foundations-bugs mailing list