Skip to content

Commit

Permalink
Fix: i686 support
Browse files Browse the repository at this point in the history
  • Loading branch information
ysbaddaden committed Apr 11, 2016
1 parent 3111882 commit e526025
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 26 deletions.
4 changes: 2 additions & 2 deletions src/exception.cr
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ struct CallStack

while true
ret = LibC.dladdr(makecontext_end, out info)
break if ret == 0 || info.sname.null?
break unless LibC.strcmp(info.sname, "makecontext") == 0
break if ret == 0 || info.dli_sname.null?
break unless LibC.strcmp(info.dli_sname, "makecontext") == 0
makecontext_end += 1
end

Expand Down
9 changes: 5 additions & 4 deletions src/lib_c/i686-linux-gnu/c/dlfcn.cr
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
@[Link("dl")]
lib LibC
RTLD_LAZY = 0x00001
RTLD_NOW = 0x00002
RTLD_GLOBAL = 0x00100
RTLD_LOCAL = 0
RTLD_LAZY = 0x00001
RTLD_NOW = 0x00002
RTLD_GLOBAL = 0x00100
RTLD_LOCAL = 0
RTLD_DEFAULT = Pointer(Void).new(0)

struct DlInfo
dli_fname : Char*
Expand Down
10 changes: 6 additions & 4 deletions src/lib_c/i686-linux-musl/c/dlfcn.cr
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
lib LibC
RTLD_LAZY = 1
RTLD_NOW = 2
RTLD_GLOBAL = 256
RTLD_LOCAL = 0
RTLD_LAZY = 1
RTLD_NOW = 2
RTLD_GLOBAL = 256
RTLD_LOCAL = 0
RTLD_DEFAULT = Pointer(Void).new(0)
RTLD_NEXT = Pointer(Void).new(-1)

struct DlInfo
dli_fname : Char*
Expand Down
9 changes: 5 additions & 4 deletions src/lib_c/x86_64-linux-gnu/c/dlfcn.cr
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
@[Link("dl")]
lib LibC
RTLD_LAZY = 0x00001
RTLD_NOW = 0x00002
RTLD_GLOBAL = 0x00100
RTLD_LOCAL = 0
RTLD_LAZY = 0x00001
RTLD_NOW = 0x00002
RTLD_GLOBAL = 0x00100
RTLD_LOCAL = 0
RTLD_DEFAULT = Pointer(Void).new(0)

struct DlInfo
dli_fname : Char*
Expand Down
10 changes: 6 additions & 4 deletions src/lib_c/x86_64-linux-musl/c/dlfcn.cr
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
lib LibC
RTLD_LAZY = 1
RTLD_NOW = 2
RTLD_GLOBAL = 256
RTLD_LOCAL = 0
RTLD_LAZY = 1
RTLD_NOW = 2
RTLD_GLOBAL = 256
RTLD_LOCAL = 0
RTLD_DEFAULT = Pointer(Void).new(0)
RTLD_NEXT = Pointer(Void).new(-1)

struct DlInfo
dli_fname : Char*
Expand Down
10 changes: 6 additions & 4 deletions src/lib_c/x86_64-macosx-darwin/c/dlfcn.cr
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
@[Link("dl")]
lib LibC
RTLD_LAZY = 0x1
RTLD_NOW = 0x2
RTLD_GLOBAL = 0x8
RTLD_LOCAL = 0x4
RTLD_LAZY = 0x1
RTLD_NOW = 0x2
RTLD_GLOBAL = 0x8
RTLD_LOCAL = 0x4
RTLD_DEFAULT = Pointer(Void).new(-2)
RTLD_NEXT = Pointer(Void).new(-1)

struct DlInfo
dli_fname : Char*
Expand Down
10 changes: 6 additions & 4 deletions src/lib_c/x86_64-portbld-freebsd/c/dlfcn.cr
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
lib LibC
RTLD_LAZY = 1
RTLD_NOW = 2
RTLD_GLOBAL = 0x100
RTLD_LOCAL = 0
RTLD_LAZY = 1
RTLD_NOW = 2
RTLD_GLOBAL = 0x100
RTLD_LOCAL = 0
RTLD_DEFAULT = Pointer(Void).new(-2)
RTLD_NEXT = Pointer(Void).new(-1)

struct DlInfo
dli_fname : Char*
Expand Down

0 comments on commit e526025

Please sign in to comment.