Re: RFR: 8328614: hsdis: dlsym can't find decode symbol [v2]

2024-04-08 Thread Robbin Ehn
On Sat, 6 Apr 2024 13:18:54 GMT, Andrew Haley wrote: > Thanks to everyone working on this. I still think that hsdis ought not to > have any dependencies on HotSpot, but I'm not going to be fanatical about it. I agree, good :) If everyone is 'okay' with this, can someone do the second review?

Re: RFR: 8328614: hsdis: dlsym can't find decode symbol [v2]

2024-04-06 Thread Andrew Haley
On Thu, 4 Apr 2024 16:43:18 GMT, Magnus Ihse Bursie wrote: > I apologize for the late reply. I've been just working spotty hours due to > spring break. I apologize for my bad temper.  Thanks to everyone working on this. I still think that hsdis ought not to have any dependencies on HotSpot,

Re: RFR: 8328614: hsdis: dlsym can't find decode symbol [v2]

2024-04-05 Thread Magnus Ihse Bursie
On Fri, 5 Apr 2024 14:01:29 GMT, Julian Waters wrote: > I plan on adding support for using gcc to compile hsdis on Windows sometime > soon (Like proper support for gcc as a toolchain on Windows, at least enough > to support hsdis, so people can freely use any gcc instead of only being >

Re: RFR: 8328614: hsdis: dlsym can't find decode symbol [v2]

2024-04-05 Thread Julian Waters
On Fri, 5 Apr 2024 12:43:30 GMT, Magnus Ihse Bursie wrote: > > Since windows build seems to need HSDIS_TOOLCHAIN_DEFAULT_CFLAGS > > Rght. That is since we use a completely different compiler, gcc instead > of cl. (Which is probably the worst hack in all of the JDK build system...) I plan

Re: RFR: 8328614: hsdis: dlsym can't find decode symbol [v2]

2024-04-05 Thread Magnus Ihse Bursie
On Fri, 5 Apr 2024 10:42:31 GMT, Robbin Ehn wrote: > Since windows build seems to need HSDIS_TOOLCHAIN_DEFAULT_CFLAGS Rght. That is since we use a completely different compiler, gcc instead of cl. (Which is probably the worst hack in all of the JDK build system...) - PR

Re: RFR: 8328614: hsdis: dlsym can't find decode symbol [v2]

2024-04-05 Thread Robbin Ehn
On Thu, 21 Mar 2024 06:58:43 GMT, Robbin Ehn wrote: >> Hi, please consider. >> >> [8327045](https://bugs.openjdk.org/browse/JDK-8327045) hide these symbols. >> Tested with gcc and clang, and llvm and binutils backend. >> >> I didn't find any use of the "DLL_ENTRY", so I removed it. >> >>

Re: RFR: 8328614: hsdis: dlsym can't find decode symbol [v2]

2024-04-04 Thread Magnus Ihse Bursie
On Thu, 21 Mar 2024 06:58:43 GMT, Robbin Ehn wrote: >> Hi, please consider. >> >> [8327045](https://bugs.openjdk.org/browse/JDK-8327045) hide these symbols. >> Tested with gcc and clang, and llvm and binutils backend. >> >> I didn't find any use of the "DLL_ENTRY", so I removed it. >> >>

Re: RFR: 8328614: hsdis: dlsym can't find decode symbol [v2]

2024-04-04 Thread Andrew Haley
On Mon, 25 Mar 2024 09:11:40 GMT, Magnus Ihse Bursie wrote: > > And neither should we compile or link it with "-fvisibility=hidden". That > > is the root of this problem. > > If you suggest that we should not compile hsdis with hidden visibility, I > disagree. Yes, that's what I would do.

Re: RFR: 8328614: hsdis: dlsym can't find decode symbol [v2]

2024-04-02 Thread Robbin Ehn
On Thu, 21 Mar 2024 06:58:43 GMT, Robbin Ehn wrote: >> Hi, please consider. >> >> [8327045](https://bugs.openjdk.org/browse/JDK-8327045) hide these symbols. >> Tested with gcc and clang, and llvm and binutils backend. >> >> I didn't find any use of the "DLL_ENTRY", so I removed it. >> >>

Re: RFR: 8328614: hsdis: dlsym can't find decode symbol [v2]

2024-03-25 Thread Magnus Ihse Bursie
On Thu, 21 Mar 2024 06:58:43 GMT, Robbin Ehn wrote: >> Hi, please consider. >> >> [8327045](https://bugs.openjdk.org/browse/JDK-8327045) hide these symbols. >> Tested with gcc and clang, and llvm and binutils backend. >> >> I didn't find any use of the "DLL_ENTRY", so I removed it. >> >>

Re: RFR: 8328614: hsdis: dlsym can't find decode symbol [v2]

2024-03-25 Thread Robbin Ehn
On Thu, 21 Mar 2024 06:58:43 GMT, Robbin Ehn wrote: >> Hi, please consider. >> >> [8327045](https://bugs.openjdk.org/browse/JDK-8327045) hide these symbols. >> Tested with gcc and clang, and llvm and binutils backend. >> >> I didn't find any use of the "DLL_ENTRY", so I removed it. >> >>

Re: RFR: 8328614: hsdis: dlsym can't find decode symbol [v2]

2024-03-25 Thread Magnus Ihse Bursie
On Mon, 25 Mar 2024 11:27:17 GMT, Robbin Ehn wrote: > src/java.base/share/native/libzip/zlib/zconf.h:# define ZEXPORT > __declspec(dllexport) zlib is third party source that is copied into our repo. I did not mean that what I said for that applies to it. (Also, we should not really export

Re: RFR: 8328614: hsdis: dlsym can't find decode symbol [v2]

2024-03-25 Thread Robbin Ehn
On Mon, 25 Mar 2024 09:12:19 GMT, Magnus Ihse Bursie wrote: > (In fact, I think we have a problem everywhere in the code base where someone > is using `__declspec(dllexport)` directly) src/java.base/share/native/libzip/zlib/zconf.h:# define ZEXPORT __declspec(dllexport) ZEXPORT is

Re: RFR: 8328614: hsdis: dlsym can't find decode symbol [v2]

2024-03-25 Thread Magnus Ihse Bursie
On Sat, 23 Mar 2024 09:42:33 GMT, Andrew Haley wrote: > And neither should we compile or link it with "-fvisibility=hidden". That is > the root of this problem. If you suggest that we should not compile hsdis with hidden visibility, I disagree. I have been working hard on unifying build of

Re: RFR: 8328614: hsdis: dlsym can't find decode symbol [v2]

2024-03-25 Thread Magnus Ihse Bursie
On Thu, 21 Mar 2024 06:58:43 GMT, Robbin Ehn wrote: >> Hi, please consider. >> >> [8327045](https://bugs.openjdk.org/browse/JDK-8327045) hide these symbols. >> Tested with gcc and clang, and llvm and binutils backend. >> >> I didn't find any use of the "DLL_ENTRY", so I removed it. >> >>

Re: RFR: 8328614: hsdis: dlsym can't find decode symbol [v2]

2024-03-23 Thread Andrew Haley
On Fri, 22 Mar 2024 13:38:54 GMT, Robbin Ehn wrote: > > > is this how you want us to export these symbols? > > > > > > Close but no cigar. :-) > > Use `JNIEXPORT` instead, that is properly defined for this purpose and > > works on all compilers. You will need to also add: > > ``` > > #include

Re: RFR: 8328614: hsdis: dlsym can't find decode symbol [v2]

2024-03-22 Thread Magnus Ihse Bursie
On Thu, 21 Mar 2024 06:58:43 GMT, Robbin Ehn wrote: >> Hi, please consider. >> >> [8327045](https://bugs.openjdk.org/browse/JDK-8327045) hide these symbols. >> Tested with gcc and clang, and llvm and binutils backend. >> >> I didn't find any use of the "DLL_ENTRY", so I removed it. >> >>

Re: RFR: 8328614: hsdis: dlsym can't find decode symbol [v2]

2024-03-22 Thread Robbin Ehn
On Fri, 22 Mar 2024 11:43:34 GMT, Magnus Ihse Bursie wrote: > > is this how you want us to export these symbols? > > Close but no cigar. :-) > > Use `JNIEXPORT` instead, that is properly defined for this purpose and works > on all compilers. You will need to also add: > > ``` > #include

Re: RFR: 8328614: hsdis: dlsym can't find decode symbol [v2]

2024-03-22 Thread Magnus Ihse Bursie
On Thu, 21 Mar 2024 06:58:43 GMT, Robbin Ehn wrote: >> Hi, please consider. >> >> [8327045](https://bugs.openjdk.org/browse/JDK-8327045) hide these symbols. >> Tested with gcc and clang, and llvm and binutils backend. >> >> I didn't find any use of the "DLL_ENTRY", so I removed it. >> >>

Re: RFR: 8328614: hsdis: dlsym can't find decode symbol [v2]

2024-03-22 Thread Magnus Ihse Bursie
On Fri, 22 Mar 2024 10:25:33 GMT, Robbin Ehn wrote: > is this how you want us to export these symbols? Close but no cigar. :-) Use `JNIEXPORT` instead, that is properly defined for this purpose and works on all compilers. You will need to also add: #include "jni.h" If this is not picked

Re: RFR: 8328614: hsdis: dlsym can't find decode symbol [v2]

2024-03-22 Thread Robbin Ehn
On Thu, 21 Mar 2024 06:58:43 GMT, Robbin Ehn wrote: >> Hi, please consider. >> >> [8327045](https://bugs.openjdk.org/browse/JDK-8327045) hide these symbols. >> Tested with gcc and clang, and llvm and binutils backend. >> >> I didn't find any use of the "DLL_ENTRY", so I removed it. >> >>

Re: RFR: 8328614: hsdis: dlsym can't find decode symbol [v2]

2024-03-21 Thread Robbin Ehn
> Hi, please consider. > > [8327045](https://bugs.openjdk.org/browse/JDK-8327045) hide these symbols. > Tested with gcc and clang, and llvm and binutils backend. > > I didn't find any use of the "DLL_ENTRY", so I removed it. > > Thanks, Robbin Robbin Ehn has updated the pull request