This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

-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[] = {
   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.


2004-01-20  Aldy Hernandez  <>

	* 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.  */
  #define ASM_FILE_END(FILE) \
    do {									\
      named_section_flags (".note.GNU-stack",				\
--- 83,88 ----

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]