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

Bug#668257: gcc-4.4: x64 - "gcc -s -static" == "unexpected reloc type in static binary" + "Segmentation fault"



Package: gcc-4.4
Version: 4.4.5-8
Severity: normal

*** Please type your report below this line ***

Compiling with "-s -static" results in the above error.

The Problem seams not exist on x86 - only on x64.

The problem maybe not gcc related, someone said its binutils related[3].

A workaround (told me in freenode/#debian) is to strip the binary after gcc.

reproduce:

$ cd /tmp && echo 'int main(){return 0;}' | gcc -x c -s -static - -o a.out && ./a.out

workaround:

$ cd /tmp && echo 'int main(){return 0;}' | gcc -x c -static - -o a.out && strip -s a.out && ./a.out

There seams no Problem in testing[1] and sid[2].

[1]: http://lists.debian.org/debian-user-german/2012/04/msg00092.html
[2]: http://lists.debian.org/debian-user-german/2012/04/msg00133.html
[3]: http://www.progtown.com/post2744615.html#p2744615

-- System Information:
Debian Release: 6.0.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash

Versions of packages gcc-4.4 depends on:
ii binutils 2.20.1-16 The GNU assembler, linker and bina
ii  cpp-4.4                       4.4.5-8    The GNU C preprocessor
ii gcc-4.4-base 4.4.5-8 The GNU Compiler Collection (base ii libc6 2.11.3-3 Embedded GNU C Library: Shared lib
ii  libgcc1                       1:4.4.5-8  GCC support library
ii libgomp1 4.4.5-8 GCC OpenMP (GOMP) support library

Versions of packages gcc-4.4 recommends:
ii libc6-dev 2.11.3-3 Embedded GNU C Library: Developmen

Versions of packages gcc-4.4 suggests:
ii gcc-4.4-doc 4.4.4.nf1-1 documentation for the GNU compiler
pn  gcc-4.4-locales <none>      (no description available)
pn  gcc-4.4-multilib <none>      (no description available)
pn  libcloog-ppl0 <none>      (no description available)
pn  libgcc1-dbg <none>      (no description available)
pn  libgomp1-dbg <none>      (no description available)
pn  libmudflap0-4.4-dev <none>      (no description available)
pn  libmudflap0-dbg <none>      (no description available)
pn  libppl-c2 <none>      (no description available)
pn  libppl7 <none>      (no description available)

-- no debconf information




Reply to: