This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [ia64] objcopy and constant-gp
- From: Nick Clifton <nickc at redhat dot com>
- To: Jakub Jermar <jakub at jermar dot eu>
- Cc: binutils at sourceware dot org
- Date: Mon, 12 Nov 2007 09:21:03 +0000
- Subject: Re: [ia64] objcopy and constant-gp
- References: <4738109C.3090008@jermar.eu>
Hi Jakub,
1. I have a binary file and want to objcopy it from the binary format to
elf64-ia64-little, creating one ELF section in it, the result is called
empty.o
2. I want to link empty.o with other .o files that were compiled with
-mconstant-gp
3. ld returns an error complaining about linking constant-gp and
non-constant-gp object files
So I would like to know if you consider this a regression or if it is
actually a feature or a fix introduced in the newest version.
I think I would count this as a feature rather than a bug, purely because there
is a better way of achieving what you want to do:
1. Create a small assembler file that includes the binary file you are
interested in:
.section foo, "a", @progbits
.incbin "the_binary_file"
2. Assemble this file, and make sure that you include the -mconstant-gp
option on the command line:
ia64-linux-as -mconstant-gp foo.s -o foo.o
3. Link in this new object file with the rest of your application.
Cheers
Nick