Bug 6412 - New binutils is incompatible with old object files with section numbers >65536
Summary: New binutils is incompatible with old object files with section numbers >65536
Status: NEW
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.19
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks: 6915
  Show dependency treegraph
 
Reported: 2008-04-16 00:10 UTC by H.J. Lu
Modified: 2012-01-08 10:06 UTC (History)
2 users (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 2008-04-16 00:10:15 UTC
Fix for PR 5900 makes binutils incompatible with old object files:

#  readelf -Sg foo.o
readelf: Error: section [96278] in group section [    4] > maximum section [96023]
readelf: Error: section [96277] in group section [    5] > maximum section [96023]
readelf: Error: section [96276] in group section [    7] > maximum section [96023]

I think binutils should issue a warning and support the old
object files.
Comment 1 Alan Modra 2008-04-16 01:06:40 UTC
I reckon the best way to support old object files is to write a utility to fix
them.  Otherwise you need hacks in three places, bfd, readelf, and gold.
Comment 2 Jonathan S. Shapiro 2008-04-16 02:53:26 UTC
This seems like a poor solution, since the number of object files out there is
very large.

If you *do* adopt this approach, are the "fixed" object files still compatible
with *older* versions of binutils? It would be unfortunate to adopt a solution
that forces synchronized upgrades of binutils.
Comment 3 Ian Lance Taylor 2008-04-16 06:02:34 UTC
The number of object files is very large, but the number of object files with
more than 65,279 sections is very small.
Comment 4 H.J. Lu 2008-04-16 12:55:00 UTC
(In reply to comment #3)
> The number of object files is very large, but the number of object files with
> more than 65,279 sections is very small.
> 

For people who have them, it is a big problem.
Comment 5 H.J. Lu 2008-04-21 21:15:15 UTC
A patch is posted at

http://sourceware.org/ml/binutils/2008-04/msg00348.html