Bug 2322 - Improve linker ELF program header error message
Summary: Improve linker ELF program header error message
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: unspecified
: P2 critical
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-10 18:38 UTC by H.J. Lu
Modified: 2006-03-17 02:34 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2006-02-10 18:38:45 UTC
When there is something wrong when generating ELF program header, ld outputs:

ld: l401.exe: Not enough room for program headers (allocated 8, need 9)
ld: final link failed: Bad value

It doesn't provide any useful information.
Comment 1 H.J. Lu 2006-02-10 18:53:25 UTC
A patch is posted at

http://sourceware.org/ml/binutils/2006-02/msg00146.html
Comment 2 Ben Elliston 2006-03-17 02:34:29 UTC
HJ's patch (http://sourceware.org/ml/binutils/2006-02/msg00146.html) was committed:

2006-02-16  H.J. Lu  <hongjiu.lu@intel.com>

        PR ld/2322
        * elf.c (get_segment_type): New function.
        (_bfd_elf_print_private_bfd_data): Use it.
        (print_segment_map): New function.
        (assign_file_positions_for_segments): Call print_segment_map
        when there are not enough room for program headers.

Closing the PR.