Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8171408

[aix] TOC overflow when linking the gtest libjvm.so

XMLWordPrintable

    • b151
    • aix

      When attemting to link the gtest libjvm.so on AIX, the TOC overflows the 64K limit, probably because the templates in the test_... files weight in heavily.

      The solution should be to link the gtest libjvm.so with -bbigtoc. Ideally, in this case all object files in the libjvm should be compiled with -qpic=large of just with -qpic as it is today. -qpic=large imposes a small performance overhead, but -qpic with -bigtoc imposes a large performance penalty.

      The problem here is that the same object files are linked to both the regular libjvm.so and to the gtest libjvm.so. The regular libjvm.so can be linked without TOC overflow, so compiling the objects with -qpic=large would impose a performance overhead without need to the regular libjvm.so.

      Therefore, the best solution would be to compile just those modules which are exclusively part of the gtest libjvm with -qpic=large. This means we use optimal settings for the regular libjvm and pay performance penalties when running the gtest libjvm.


            stuefe Thomas Stuefe
            stuefe Thomas Stuefe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: