This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
-mrelocatable broken on ppc-linux
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: jakub at redhat dot com, amodra at bigpond dot net dot au
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 20 Jan 2004 23:14:53 -0400
- Subject: -mrelocatable broken on ppc-linux
Hi guys.
The biarch patch broke -mrelocatable for powerpc-linux-gnu*:
frogsleap:/build/uber-linuxspe/gcc$ cat /tmp/a.c
char *msg[] = {
"Hello",
"World"
};
frogsleap:/build/uber-linuxspe/gcc$ ./cc1 /tmp/a.c -mrelocatable -quiet
frogsleap:/build/uber-linuxspe/gcc$ ./as /tmp/a.s -mrelocatable
/tmp/a.s: Assembler messages:
/tmp/a.s:15: Error: Relocation cannot be done when using -mrelocatable
/tmp/a.s:16: Error: Relocation cannot be done when using -mrelocatable
The culprit seems to be the undef of RELOCATABLE_NEEDS_FIXUP in
linux.h introduced by the biarch patch. I don't see a ChangeLog entry
for it either.
Was this a cut-n-paste error from linux64.h, or am I missing
something? If it is a mistake, the patch below fixes the problem. As
it is now, -mrelocatable is broken on mainline and the 3.4 branch.
Cheers.
Aldy
2004-01-20 Aldy Hernandez <aldyh@redhat.com>
* config/rs6000/linux.h (RELOCATABLE_NEEDS_FIXUP): Delete.
Index: config/rs6000/linux.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/linux.h,v
retrieving revision 1.39
diff -c -p -r1.39 linux.h
*** config/rs6000/linux.h 4 Jun 2003 16:44:51 -0000 1.39
--- config/rs6000/linux.h 21 Jan 2004 03:07:20 -0000
***************
*** 83,91 ****
#undef TARGET_64BIT
#define TARGET_64BIT 0
- /* We don't need to generate entries in .fixup. */
- #undef RELOCATABLE_NEEDS_FIXUP
-
#define ASM_FILE_END(FILE) \
do { \
named_section_flags (".note.GNU-stack", \
--- 83,88 ----