What's gcj?

gcj (src: gcc-whatever) compiles (something resembling) Java to native binaries.

It's used, in Debian, mostly to produce versions of build tools which don't depend on having default-jre installed (probably because default-jre is order-of 100MB).

Detection

debbindiff finds a Build Id: variation during readelf, probably for a file named something.jar.so.

Cause

Unknown.

$ sudo apt-get install gcj-4.9-jdk
...
$ echo 'public class A { public static void main(String[] s) { System.out.println("Hello world."); } }' > A.java
$ gcj-4.9 -c A.java && readelf --all A.o > 1
$ gcj-4.9 -c A.java && readelf --all A.o > 2
$ diff -u 1 2
@@ -169,7 +169,7 @@
 Symbol table '.symtab' contains 47 entries:
    Num:    Value          Size Type    Bind   Vis      Ndx Name
      0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND 
-     1: 0000000000000000     0 FILE    LOCAL  DEFAULT  ABS cce7CLvy.jar
+     1: 0000000000000000     0 FILE    LOCAL  DEFAULT  ABS ccCSg3WR.jar
      2: 0000000000000000     0 SECTION LOCAL  DEFAULT    1 
      3: 0000000000000000     0 SECTION LOCAL  DEFAULT    3 
      4: 0000000000000000     0 SECTION LOCAL  DEFAULT    5 


... but also sometimes:

@@ -137,14 +137,14 @@
 Relocation section '.rela.debug_info' at offset 0x1210 contains 12 entries:
   Offset          Info           Type           Sym. Value    Sym. Name + Addend
 000000000006  00150000000a R_X86_64_32       0000000000000000 .debug_abbrev + 0
-00000000000c  00180000000a R_X86_64_32       0000000000000000 .debug_str + 47
-000000000011  00180000000a R_X86_64_32       0000000000000000 .debug_str + 40
-000000000015  00180000000a R_X86_64_32       0000000000000000 .debug_str + 2a
+00000000000c  00180000000a R_X86_64_32       0000000000000000 .debug_str + 25
+000000000011  00180000000a R_X86_64_32       0000000000000000 .debug_str + 157
+000000000015  00180000000a R_X86_64_32       0000000000000000 .debug_str + 141
 000000000019  000200000001 R_X86_64_64       0000000000000000 .text + 0
 000000000029  00170000000a R_X86_64_32       0000000000000000 .debug_line + 0
 00000000002e  00180000000a R_X86_64_32       0000000000000000 .debug_str + 0
 000000000034  000200000001 R_X86_64_64       0000000000000000 .text + 0
-000000000047  00180000000a R_X86_64_32       0000000000000000 .debug_str + 25
+000000000047  00180000000a R_X86_64_32       0000000000000000 .debug_str + 15e
 00000000004d  000200000001 R_X86_64_64       0000000000000000 .text + 22
 000000000060  00180000000a R_X86_64_32       0000000000000000 .debug_str + 7
 000000000064  000200000001 R_X86_64_64       0000000000000000 .text + 8b