This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: gcc binary format output
- From: Kai Ruottu <karuottu at mbnet dot fi>
- Cc: Victor Roman Archidona <daijo at unixevil dot info>, gcc-help at gcc dot gnu dot org, binutils at sourceware dot org
- Date: Tue, 18 Jul 2006 15:37:43 +0300
- Subject: Re: gcc binary format output
- References: <44B4500F.4010406@unixevil.info> <44B64336.1040107@mbnet.fi> <17590.16794.458483.581617@zebedee.pink> <44B67AE5.8050307@mbnet.fi> <44B8F528.1000401@unixevil.info> <44BBE453.6000604@mbnet.fi>
Kai Ruottu kirjoitti:
Victor Roman Archidona kirjoitti:
Thanks for your feedback Kai. In the binutils mailing list has been
sent a patch that fixes the problem. The URL for anyone interested in
it is:
http://www.sourceware.org/ml/binutils/2006-07/msg00192.html
lets see what the 'x86_64-freebsd6.1' ones will do now.
The given patches weren't enough :-( The resulted GNU linker complained
about not finding the output format etc. A quick "how these things were
done
in 'alpha', 'i386' etc." comparison revealed that also the 'ld/emulparams'
directory required the following patch in the current
'binutils-2.17.50.0.3' :
---------------- clip ----------------------------
*** elf_x86_64_fbsd.sh.orig Thu Mar 7 21:52:39 2002
--- elf_x86_64_fbsd.sh Tue Jul 18 15:06:58 2006
***************
*** 1,2 ****
--- 1,3 ----
. ${srcdir}/emulparams/elf_x86_64.sh
. ${srcdir}/emulparams/elf_fbsd.sh
+ OUTPUT_FORMAT="elf64-x86-64-freebsd"
---------------- clip ----------------------------
After adding this the produced binutils gave right labeled executables and
more importantly the crosscompilers to the 'x86_64-freebsd6.1' target
could be built, giving seemingly OK shared libraries with the following:
kai@Dell:/data1/home/src/gcc-4.0.3/build/gcc> readelf -h libgcc_s.so.1
ELF Header:
Magic: 7f 45 4c 46 02 01 01 09 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - FreeBSD
ABI Version: 0
Type: DYN (Shared object file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
output got via the 'readelf -h'...