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]

PATCH: Fix debug relocation for ia64


On Wed, Jul 09, 2003 at 10:05:42AM -0700, H. J. Lu wrote:
> ld -r generates bogus debug info on ELF/ia64:
> 
> # make
> ld -z defs -shared -o a.so add_n.o adjtime.o
> adjtime.o(.text+0x142): In function `adjtime':
> ../sysdeps/unix/sysv/linux/adjtime.c:57: undefined reference to
> `__adjtimex_internal'
> adjtime.o(.text+0x382):../sysdeps/unix/sysv/linux/adjtime.c:57: undefined
> reference to `__GI___errno_location'
> make: [a.so] Error 1 (ignored)
> ld -r -o b.os add_n.o adjtime.o
> ld -z defs -shared -o b.so b.os
> b.os(.text+0x1e2)ld: Dwarf Error: DW_FORM_strp offset (7630441) greater than or
> equal to .debug_str size (17063).
> : In function `adjtime':
> : undefined reference to `__adjtimex_internal'
> b.os(.text+0x422): In function `adjtime':
> : undefined reference to `__GI___errno_location'
> make: [b.so] Error 1 (ignored)
> 
> 

It turned out that it was an ia64 bug. The problem is ia64 relocations
define src_mask and dst_mask to be 0. It is not a problem for normal
ia64 relocations since src_mask and dst_mask are not used. But
src_mask and dst_mask are used in bfd_perform_relocation to relocate
debug sections. I set them to -1LL. I think it should work with
relocations in debug sections for both LP64 and ILP32.


H.J.

Attachment: bfd-ia64-reloc.patch
Description: Text document


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