RFC: BC-ABI version IDs, take 2

Bryce McKinlay mckinlay@redhat.com
Sat May 21 09:20:00 GMT 2005


Here's another version ID patch. The basic changes are:

- From the 32-bit version ID, we use 20 bits for a numerical version 
number. For the C++ ABI, this is calculated from the major and minor GCC 
version numbers. For the BC ABI, this number could be arbritary, but I 
think there is some value in using a number which relates to the first 
GCC version that ABI is compatible with. It avoids the need to maintain 
a table somewhere mapping version IDs to specific GCJ releases, and if 
we were to print some error message if a class with an incompatible 
version ID is loaded, then a useful error message can be derived from 
the version ID.

- 2 digits in the version number are reserved for a "minor ABI version". 
This could be used in the event that an addition/change to the ABI is 
made during a GCC release cycle.

- The remaining 12 bits are reserved for flags that could represent 
various ABI features, or just additional ABI-specific options. Currently 
2 flags are defined:

FLAG_BINARYCOMPAT_ABI
FLAG_BOOTSTRAP_LOADER

This scheme should give us a more flexible and scalable ID number going 
forward. Comments?

Bryce

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcj-version-id.patch
Type: text/x-patch
Size: 6833 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20050521/fe288c5a/attachment.bin>


More information about the Java-patches mailing list