svn commit: r457655 - in head/lang/luajit: . files
Dimitry Andric
dim at FreeBSD.org
Sun Dec 31 00:50:33 UTC 2017
Author: dim (src committer)
Date: Sun Dec 31 00:50:32 2017
New Revision: 457655
URL: https://svnweb.freebsd.org/changeset/ports/457655
Log:
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
Added:
head/lang/luajit/files/patch-src_jit_bcsave.lua (contents, props changed)
Modified:
head/lang/luajit/Makefile
Modified: head/lang/luajit/Makefile
==============================================================================
--- head/lang/luajit/Makefile Sun Dec 31 00:00:06 2017 (r457654)
+++ head/lang/luajit/Makefile Sun Dec 31 00:50:32 2017 (r457655)
@@ -3,6 +3,7 @@
PORTNAME= luajit
DISTVERSION= 2.0.5
+PORTREVISION= 1
CATEGORIES= lang
MASTER_SITES= http://luajit.org/download/
DISTNAME= LuaJIT-${DISTVERSION}
Added: head/lang/luajit/files/patch-src_jit_bcsave.lua
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/lang/luajit/files/patch-src_jit_bcsave.lua Sun Dec 31 00:50:32 2017 (r457655)
@@ -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
More information about the svn-ports-all
mailing list