Bug 10152 - [2.20 regression] ld segfault linking the kernel
Summary: [2.20 regression] ld segfault linking the kernel
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: 2.20
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-13 15:57 UTC by Matthias Klose
Modified: 2009-05-17 20:02 UTC (History)
2 users (show)

See Also:
Host:
Target: arm-linux-gnueabi
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Klose 2009-05-13 15:57:25 UTC
http://sourceware.org/ml/binutils/2009-05/msg00220.html

Paul Brook schrieb:
> The patch below implements linker processing of ARM unwinding tables 
> (SHT_ARM_EXIDX).
> 
> 2009-05-05  Paul Brook  <paul@codesourcery.com>
> 
> 	bfd/
> 	* bfd-in.h (elf32_arm_fix_exidx_coverage): Add prototype.
> 	* bfd-in2.h: Regenerate.
> 	* elf32-arm.c (arm_unwind_edit_type, arm_unwind_table_edit): Define.
> 	(_arm_elf_section_data): Add text and exidx fields.
> 	(add_unwind_table_edit, get_arm_elf_section_data, adjust_exidx_size,
> 	insert_cantunwind_after, elf32_arm_fix_exidx_coverage, offset_prel31,
> 	copy_exidx_entry): New functions.
> 	(elf32_arm_write_section): Fixup .ARM.exidx contents.
> 
> 	ld/
> 	* emultempl/armelf.em (compare_output_sec_vma): New function.
> 	(gld${EMULATION_NAME}_finish): Add exidx munging code.

This breaks kernel builds on arm-linux-gnueabi. Checked by reverting this
change. command line used and object files at https://launchpad.net/bugs/375991

  Matthias

Program received signal SIGSEGV, Segmentation fault.
bfd_set_section_size (abfd=0x0, ptr=0x7e5f8, val=8) at ../../bfd/section.c:1297
1297      if (abfd->output_has_begun)
(gdb) bt
#0  bfd_set_section_size (abfd=0x0, ptr=0x7e5f8, val=8) at ../../bfd/section.c:1297
#1  0x4005c60c in elf32_arm_fix_exidx_coverage (text_section_order=<value
optimized out>, num_text_sections=4,
    info=<value optimized out>) at ../../bfd/elf32-arm.c:8425
#2  0x00026980 in gldarmelf_linux_eabi_finish () at earmelf_linux_eabi.c:420
#3  0x00021ea8 in ldemul_finish () at ../../ld/ldemul.c:90
#4  0x0001ac08 in lang_process () at ../../ld/ldlang.c:6282
#5  0x0001f154 in main (argc=10000, argv=0x12) at ../../ld/ldmain.c:479
Comment 1 Matthias Klose 2009-05-17 20:02:12 UTC
fixed in 20090516 trunk