Thread View: gnu.utils.bug
1 messages
1 total messages
Started by Jyrki Kuoppala
Fri, 09 Jun 1989 04:44
A portability but in GNU ld in a cross-compiler environment
Author: Jyrki Kuoppala
Date: Fri, 09 Jun 1989 04:44
Date: Fri, 09 Jun 1989 04:44
47 lines
1809 bytes
1809 bytes
Using the latest GNU ld on a sparc machine with the GNU linker
configured for a m68k target machine:
(gdb) r /usr/ressu/users/jkp/gcc-68k/gcc-crt0.o /usr/ressu/users/jkp/foo.o -lc
Starting program: /usr/ressu/users/jkp/tmp/bu/ld /usr/ressu/users/jkp/gcc-68k/gcc-crt0.o /usr/ressu/users/jkp/foo.o -lc
Program received signal 10, Bus error
Reading in symbols for ld.c...done.
perform_relocation (data=(char *) 0xfefff898 "#\300", pc_relocation=0, data_size=60, reloc_info=(struct relocation_info *) 0xfefff870, reloc_size=32, entry=(struct file_entry *) 0x1a7e8) (ld.c line 3981)
(gdb)
This is in the code in the following place:
break;
case 2:
if (RELOC_MEMORY_ADD_P(p))
=> relocation += mask & *(long *) (data + addr);
*(long *) (data + addr) &= ~mask;
*(long *) (data + addr) |= relocation;
break;
default:
fatal_with_file ("Unimplemented relocation field length in ", entry);
Some variables:
(gdb) print data
$1 = (char *) 0xfefff898 "#\300"
(gdb) print addr
$2 = 2
(gdb) print mask
$3 = 4294967295
(gdb) print relocation
$4 = 8132
(gdb)
So, it seems that on a Sparc you can't read a long except from a
longword-aligned address and on this cross-development configuration
alignment this would be needed.
All the programs were compiled with gcc 1.35.
I can provide more information if that's needed.
//Jyrki
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads