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

link: github.com/arnodel/golua/runtime: invalid reference to runtime.int64Hash #105

Closed
TorchedSammy opened this issue Sep 20, 2024 · 2 comments · Fixed by #106
Closed

link: github.com/arnodel/golua/runtime: invalid reference to runtime.int64Hash #105

TorchedSammy opened this issue Sep 20, 2024 · 2 comments · Fixed by #106
Assignees

Comments

@TorchedSammy
Copy link
Contributor

Go 1.23 makes a change which causes golua to not link/build/whatever without the specific flag that allows the behavior the new release blocks. Is the only solution to use that flag, or can this be fixed here?

@arnodel
Copy link
Owner

arnodel commented Sep 22, 2024

There is a proposal (golang/go#54670), which has been accepted, which might be able to be used instead. In the meantime I would need to implement some hashing functions which will likely be slower (haven't measured it!).

@arnodel
Copy link
Owner

arnodel commented Nov 3, 2024

I had a little bit of time to look at this issue. It is because of this change to the linker(see go 1.23 release notes)

The linker now disallows using a //go:linkname directive to refer to internal symbols in the standard library (including the runtime) that are not marked with //go:linkname on their definitions. Similarly, the linker disallows references to such symbols from assembly code. For backward compatibility, existing usages of //go:linkname found in a large open-source code corpus remain supported. Any new references to standard library internal symbols will be disallowed.

A linker command line flag -checklinkname=0 can be used to disable this check, for debugging and experimenting purposes.

I will try to find the time to get a fix in, in the meantime it is still possible to build golua on go 1.23 with the -ldflags='-checklinkname=0' option.

@arnodel arnodel self-assigned this Nov 3, 2024
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

Successfully merging a pull request may close this issue.

2 participants