mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-20 08:27:15 +00:00
Fix lang/luajit object file .strtab section size
When luajit writes a ELF object file (using the -b option), it sets the size of the .strtab section one byte too short. In function bcsave_elfobj(), the offset of the .rodata section after .strtab is already calculated correctly, but the size of .strtab itself is one byte too small. Even though there is a zero byte after the last string in the table, the short size causes lld (the LLVM linker) to show an error message similar to: ld: error: obj/bytecode.o: string table non-null terminated Fix it by increasing the size of the .strtab section by one byte. This change has also been accepted upstream, but there is no new stable release yet. Approved by: portmgr (antoine) PR: 223688
This commit is contained in:
parent
0830d4503b
commit
585d5363b8
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=457655
@ -3,6 +3,7 @@
|
||||
|
||||
PORTNAME= luajit
|
||||
DISTVERSION= 2.0.5
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= lang
|
||||
MASTER_SITES= http://luajit.org/download/
|
||||
DISTNAME= LuaJIT-${DISTVERSION}
|
||||
|
11
lang/luajit/files/patch-src_jit_bcsave.lua
Normal file
11
lang/luajit/files/patch-src_jit_bcsave.lua
Normal file
@ -0,0 +1,11 @@
|
||||
--- src/jit/bcsave.lua.orig 2017-05-01 18:11:00 UTC
|
||||
+++ src/jit/bcsave.lua
|
||||
@@ -275,7 +275,7 @@ typedef struct {
|
||||
o.sect[2].size = fofs(ofs)
|
||||
o.sect[3].type = f32(3) -- .strtab
|
||||
o.sect[3].ofs = fofs(sofs + ofs)
|
||||
- o.sect[3].size = fofs(#symname+1)
|
||||
+ o.sect[3].size = fofs(#symname+2)
|
||||
ffi.copy(o.space+ofs+1, symname)
|
||||
ofs = ofs + #symname + 2
|
||||
o.sect[4].type = f32(1) -- .rodata
|
Loading…
Reference in New Issue
Block a user