[oi-dev] What is the equivalent for GNU ld's --export-dynamic?

cretin1997 cretin1997 at protonmail.com
Wed Mar 24 16:40:48 UTC 2021


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Wednesday, March 24, 2021 11:29 PM, cretin1997 via oi-dev <oi-dev at openindiana.org> wrote:

> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Wednesday, March 24, 2021 11:03 PM, Bob Friesenhahn bfriesen at simple.dallas.tx.us wrote:
>
> > On Wed, 24 Mar 2021, cretin1997 via oi-dev wrote:
> >
> > > I currently remove the option because I don't know the equivalent for Sun's ld. This allowed the compiler to successfully generate a shared library file but I didn't test to see if this shared library even work or not. I think better ask first before actually push the changes. Yes, of course I'm using git, in case any of you ask me about that.
> >
> > Do you actually need this option? This option enables shared
> > libraries to resolve symbols from the program (e.g. using
> > dlopen(),dlsym()) which loaded them. It also causes the executable to
> > expose all of its extern symbols, which will make the program more
> > bloated, and likely less optimized.
> > Solaris and modern Linux defaults are different regarding default
> > symbol visibility. Linux has become more restrictive.
> > Bob
> >
> > Bob Friesenhahn
> > bfriesen at simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
> > GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
> > Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt
> > oi-dev mailing list
> > oi-dev at openindiana.org
> > https://openindiana.org/mailman/listinfo/oi-dev
>
> Honestly I don't know. I'm just a completely amateur. The FreeBASIC compiler is not designed with portability in mind but their architecture allow them to be fairly portable, very easy to port to new platforms. I contact the developers asked for Illumos support, as usual with FOSS project they told me to do the porting myself, it's easy, they said. They give me a list of source files I need to edit to adapt the code to the new platform. After many days of trial and error finally I have a working FreeBASIC compiler on OpenIndiana, possible to generate working binary. But the problem is I didn't test the compilation of shared library. So when I try to compile one, it failed immediately.
>
> I know the Solaris linker is what caused all of the trouble. FreeBASIC expects a GNU linker. This time is the same. The Solaris ld doesn't support --export-dynamic.
>
> I adapt the code for Solaris by blindly translate from the Linux ones. I don't understand the internal working of the compiler. If will much better if the developers do the porting themselves. But, you already know, when you want something and you go to the developers of a FOSS project, they don't care if you really have the ability to do it or not but will always said this famous statement: do it yourself, you can submit the code to us. This including this OpenIndiana, too. And you think what I could do with it? I really do it myself, without assistant from them, no one to ask when you have questions, no one at all, and they have not even merged my pull request (contains fixes for dealing with the Solaris linker).
>
> Sometimes I really hope I'm rich. I will dump the FOSS software into the trash can and buy commercial ones. At least, I will have someone to answer to me. But it's just my own delusional. I'm unemployed for more than 5 yrs.
>
> Put this shit aside, what I do is I just removed the problematic option. FreeBASIC does turn on it option for Linux. I don't know what it does, nor I wanted to know, I only wanted to know the equivalent option for the Solaris linker. If no such equivalent option available, does the shared library produced by FreeBASIC with --export-dynamic removed work? What is the side effect if without --export-dynamic? This is the only thing I wanted to know! The one most qualified to answer such question should be the FreeBASIC developers, but, as you already known... do it yourself and you could submit the code to us!
>
> Sent with ProtonMail Secure Email.
>
> oi-dev mailing list
> oi-dev at openindiana.org
> https://openindiana.org/mailman/listinfo/oi-dev

I don't want to bad mouth about them. They are just the same as any other FOSS project, including this OpenIndiana. They indeed did an amazing job, giving a too small development team and too small user base. I don't blame them. They worked for free after all!

Amending to the previous lengthy but no useful information email, I want to add that after I removed --export-dynamic I actually could have the compiler to successfully generated a shared library (.so file) for me. The only problem is I don't know if this shared library would even work nor the side effect of removing --export-dynamic.

My github repo: https://github.com/CretinHo/fbc

Checkout the branch solaris-fix to see my latest work (nothing serious here, though, please don't laugh because it's too trivial).


Sent with ProtonMail Secure Email.



More information about the oi-dev mailing list