This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: statically linked executable size


Per Bothner wrote:
Tom Tromey wrote:
We've talked about splitting libgcj.so into a few libraries before.
...
The drawbacks that I know of are:
...
* Users would have to know to link in these libraries if they wanted
  to use them from CNI-style compiled program (or statically linked
  program)

Does Elf have a mechanism to specify that this object/library requires some other library? If so, then we can use that mechanism.

If I understand you right, then you suggest what actually happens right now and is the source of the problem: java is that heavily interconnected, we end up with executables which include a big part of the API.


What about an additional linker flag which takes a list of packages that shouldn't be included? gcj --omitPackages=@list --main=... ...
with the file list e.g.: javax.swing java.awt
Sounds to me like hell to implement (I read that there are single object files which are included as whole), but it would be really flexible...



The idea that users should have to specify which libraries to link
with is something I find totally lame.  That people needed to do this
20 years ago is no excuse to continue such nonsense.  I.e. if my C/C++
program includes <math.h> that should be enough information that the
linker can figure out we need libm.

...



regards Marco


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]