Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hidden symbol referenced by DSO #473

Open
raziel- opened this issue Oct 14, 2024 · 4 comments
Open

Hidden symbol referenced by DSO #473

raziel- opened this issue Oct 14, 2024 · 4 comments

Comments

@raziel-
Copy link
Contributor

raziel- commented Oct 14, 2024

Hi ptitseb,

sorry for stealing your time, maybe (most surely) i'm completely wrong here anyways...

According to this article:
https://stackoverflow.com/questions/23696585/what-does-exactly-the-warning-mean-about-hidden-symbol-being-referenced-by-dso

a global symbol that is hidden from DSO usage will lead to a linker error.
Which is exactly what i'm getting when trying to link an SDL2 app with libSDL2_gl4es.so

LINK scummvm
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: scummvm: hidden symbol `aglSetParams2' in /SDK/local/newlib/lib/libgl4es.a(agl.c.obj) is referenced by DSO
Development:Coding/SDK/gcc/ppc-amigaos/bin/ld: final link failed: Bad value
gmake: *** [scummvm] Error 1

I did an objdump of libgl4es.a and found the exact same case as in the article.

aglsSetParams2 is inside the list two times, where the first one is unknown by me, but the second one is exactly what the article described

00000000 UND 00000000 aglSetParams2

00000634 g F .text 00000064 .hidden aglSetParams2

It's marked as global (g) and as thus seen by the linker, but hidden (.hidden) for shared usage, iiuc) and what i understand from that article that shouldn't be the case?

Now my question...is this intended to be hidden?
Is it a problem of the main (this tree) library or do i have to "fix" it in the AmigaOS4 target of libgl4es.a?

Thanks you very much

@ptitSeb
Copy link
Owner

ptitSeb commented Oct 14, 2024

those symbol (like most of OpenGL symbols) are supposed to be dynamic and fetched using aglGetProcAddress("glSetParams2") for example.

This is the regular way to use OpenGL. Only 1.x API is exposed directly, all the other API is optionnal and so behind a "GetProcAddress" function (like glXGetProcAddress on Linux/X11, wglGetProcAddress on Windows or aglGetProcAddress on Amiga).

@raziel-
Copy link
Contributor Author

raziel- commented Oct 14, 2024

Thank you for the quick answer.

so, the problem lies on my platforms way of getting the process?
sorry, noob here

@ptitSeb
Copy link
Owner

ptitSeb commented Oct 14, 2024

Yeah, you should ask for help on some AmigaOS board, I don't own an Amiga myself.

@raziel-
Copy link
Contributor Author

raziel- commented Oct 14, 2024

thank you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants