Thanks for the reply @Magnus Ihse Bursie<mailto:magnus.ihse.bur...@oracle.com>
Is there any example of PRs which create such libraries that I can refer to ?
Is OSAL similar to how os.cpp is defined and respective platforms implement 
them ?


From: Magnus Ihse Bursie <magnus.ihse.bur...@oracle.com>
Date: Tuesday, 7 May 2024 at 6:18 PM
To: Thomas Stüfe <thomas.stu...@gmail.com>, Suchismith Roy 
<suchismith....@ibm.com>
Cc: build-dev@openjdk.org <build-dev@openjdk.org>
Subject: [EXTERNAL] Re: JDK-8170635 -- adding a base library to java
On 2024-05-06 16:36, Thomas Stüfe wrote:

> Not sure if you meant to address this mail to a specific person. I
> assume with proposal you mean this:
> https://mail.openjdk.org/pipermail/build-dev/2016-September/017746.html  ?
>
> If yes, my proposal was to move dladdr out of the OpenJDK code base
> into an independent library that would be maintained by IBM,
> hopefully, and would be a prerequisite for building the JDK.
> If no, whose proposal did you mean?

Oh, this is an old bug you're picking up Suchismith!

I read through the discussion from 2016. It seems that the suggestion to
make an external 3rd party library was only supported by Thomas, and
that the general agreement among the other participants was that we
should have a general, base-level "OSAL" (OS abstraction library) in the
JDK, that could be used by both Hotspot and libjli, as well as other JDK
libraries.

Creating such a library would be a much larger effort than just adding a
AIX implementation of dladdr to it, if it existed. The current structure
of the JDK does not readily lend itself to such a library, neither in
terms of source code layout nor build system.

With that said, I do think it would be good if we had such a library.
There are more cases than the AIX dladdr issue that is duplicated, like
jio_snprintf() and friends. This has actually caused some headaches when
doing static builds, since duplication of these functions are not
allowed when creating a single linked instance. (The current duplication
in dynamic libraries is just ugly and bad programming, not a compilation
error.)

But it is a much larger question than just fixing an AIX issue.

/Magnus

Reply via email to