Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 28 Nov 2017 15:17:43 +0100
From: harrim4n <>
Subject: Compiling John as a shared object

Hi all,

I'm trying to compile John as a shared object to use in python bindings
for a project I'm working on. I'm using the latest version from

However I'm running into some issues doing so, namely the x86-64.S file.
As this file is assembly, I can't simply recompile it with -fPIC.

This causes the following error when trying to create a "" file:

/usr/bin/ld: x86-64.o: relocation R_X86_64_PC32 against symbol
`nt_buffer8x' can not be used when making a shared object; recompile
with -fPIC

However, to me, the assembly already looks to be position independent.
This is also indicated by the comment on line 1769:

/* ...converted to use %rip-relative addressing, still public domain */

Does anyone have pointers as to how I could either modify the assembly
to be PI or any other way I could create python bindings for John?

I am aware that I could rebuild the python interpreter and use static
linking, however I would like to avoid this option because of obvious
maintainability issues. I also tried simply using a statically built lib
in the file, but then I get

ImportError: /usr/lib/python2.7/site-packages/ undefined
symbol: fmt_nsec3



Powered by blists - more mailing lists

Your e-mail address:

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.