This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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]

Committed: add .debug_ranges to section list in mmo.sc (elf.sc too?)


Recently gcc has started to emit relocs from .debug_info to
.debug_ranges or some other change with similar effect.
Being 32-bit references in a 64-bit address space, they must be
in the range 0..0xffffffff or there will be link failures.
Since that section isn't listed in mmo.sc, it's orphaned.  It
gets placed after the .data sections, located at 0x2<many
zeros>0, and we have failure:
.../builds2/mmixware-sim/mmix//newlib/libc.a(write.o)(.debug_info+0xc8b):
 relocation truncated to fit: R_MMIX_32 .debug_ranges

The section .debug_ranges isn't listed in elf.sc either, but elf
has different enough placement (perhaps YMMV between targets);
it gets a zero start address and all is fine.

The real fix might be to make mmo_place_orphan look at section
flags, but then again, .debug_ranges *wasn't* marked as a debug
section (maybe a gcc or elsewhere bug), so placing it with the
debug sections wouldn't have preference AFAICT, unless there
would be some cheating and peeking at the section.

	* scripttempl/mmo.sc: Add .debug_ranges to listed sections.

Index: mmo.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/mmo.sc,v
retrieving revision 1.1
diff -p -c -r1.1 mmo.sc
*** mmo.sc	2001/10/30 15:20:11	1.1
--- mmo.sc	2001/12/16 11:32:09
*************** SECTIONS
*** 72,77 ****
--- 72,78 ----
    .debug_str      0 : { *(.debug_str) }
    .debug_loc      0 : { *(.debug_loc) }
    .debug_macinfo  0 : { *(.debug_macinfo) }
+   .debug_ranges   0 : { *(.debug_ranges) }

    .data ${RELOCATING+ ${DATA_ADDR}}:
    {

brgds, H-P


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