Hi,
I've encountered another BFD problem, similar to the one reported by Eric a
few months back (2015-03-25 13:43:23).
I am currently using GCC 4.9.3 and binutils 2.25.1 on a gentoo machine
(which include the fix by Alan Modra), and I'm getting the following error:
/usr/libexec/gcc/msp430-elf/ld: BFD (Gentoo 2.25.1 p1.0) 2.25.1 internal
error, aborting at
/var/tmp/portage/cross-msp430-elf/binutils-2.25.1/work/binutils-2.25.1/bfd/elf-eh-frame.c
line 1732 in _bfd_elf_write_section_eh_frame
Here is the code snippet:
/* We don't align the section to its section alignment since the
runtime library only expects all CIE/FDE records aligned at
the pointer size. _bfd_elf_discard_section_eh_frame should
have padded CIE/FDE records to multiple of pointer size with
size_of_output_cie_fde. */
sec_size = sec->size;
if (sec_info->count != 0
&& sec_info->entry[sec_info->count - 1].size == 4)
sec_size -= 4;
if ((sec_size % ptr_size) != 0)
abort (); */* this is line 1732 */*
I've narrowed it down to an [.eh_frame] in one of the object files, which
has a size of 74 (0x4a) while ptr_size is 4.
Here is the complete output of objdump:
$ msp430-elf-objdump -h /tmp/1.o
/tmp/1.o: file format elf32-msp430
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00000000 00000000 00000000 00000034 2**0
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .data 00000000 00000000 00000000 00000034 2**0
CONTENTS, ALLOC, LOAD, DATA
2 .bss 00000000 00000000 00000000 00000034 2**0
ALLOC
3 .text.startup.main 00000026 00000000 00000000 00000034 2**1
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
* 4 .eh_frame 0000004a 00000000 00000000 0000005a 2**1*
* CONTENTS, ALLOC, LOAD, RELOC, DATA*
5 .comment 0000002b 00000000 00000000 000000a4 2**0
CONTENTS, READONLY
6 .MSP430.attributes 00000017 00000000 00000000 000000cf 2**0
CONTENTS, READONLY
I've tried replacing both msp43-elf-g++ and msp430-elf-ld with ones I built
from source obtained from TI's site (
http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/latest/exports/msp430-gcc-source.tar.bz2)
but received the same results.
HAs anyone else encountered this problem?
Is the problem in the linker or compiler:
Should LD be able to handle this eh_frame?
Or should GCC have created an eh_frame with correct (i.e. aligned) size ?
Thank you very much for your help,
------------------------------------------------------------------------------
_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users