This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: crash with --gc-sections
- To: Ian Lance Taylor <ian at zembu dot com>
- Subject: Re: crash with --gc-sections
- From: Philip Blundell <pb at futuretv dot com>
- Date: Fri, 10 Nov 2000 12:08:44 +0000
- cc: binutils at sources dot redhat dot com
In message <20001109173339.2685.qmail@daffy.airs.com>, Ian Lance Taylor writes:
>The patch may be right, but why is the garbage collector visiting the
>*ABS* section? I can't see any obvious reason that that should
>happen. I generally recommend against fixing symptoms without
>understanding the underlying problem.
Here's a case that provokes it for an arm-elf target.
$ cat a.s
.section .text.foo,"ax"
.globl foo
.set foo, 0
$ cat b.c
extern void foo(void);
int _start()
{
return foo;
}
$ arm-elf-as -o a.o a.s
$ arm-elf-gcc -c -o b.o b.c
b.c: In function `_start':
b.c:5: warning: return makes integer from pointer without a cast
$ arm-elf-objdump --reloc b.o
b.o: file format elf32-littlearm
RELOCATION RECORDS FOR [.text]:
OFFSET TYPE VALUE
00000010 R_ARM_PC24 .text
00000018 R_ARM_ABS32 foo
$ arm-elf-ld a.o b.o --gc-sections
Segmentation fault
p.