* [dpdk-users] Fwd: Undelivered Mail Returned to Sender
[not found] ` <20160728044529.DDE6C3604BE@narya.tortall.net>
@ 2016-07-28 4:49 ` Chinmaya Dwibedy
2016-07-28 15:16 ` Declan Doherty
0 siblings, 1 reply; 2+ messages in thread
From: Chinmaya Dwibedy @ 2016-07-28 4:49 UTC (permalink / raw)
To: users
Hi All,
I have downloaded the IPsec mult-buffer library (ipsec_043.zip) from Intel
site (mentioned at http://dpdk.org/doc/guides-16.04/cryptodevs/aesni_mb.html)
and compiled it using #make YASM=/usr/bin/yasm. Upon trying to create a
shared library from static library using #gcc -shared -Wl,--whole-archive
libIPSec_MB.a -o libIPSec_MB.so, it gives the below link error.
/usr/bin/ld: libIPSec_MB.a(aes128_cntr_by4_sse.o): relocation R_X86_64_PC32
against symbol `byteswap_const' cannot be used when making a shared object;
recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
[root@mgmt-rig-7 code]#
The version of yasm is 1.3.0. The release note at
http://yasm.tortall.net/releases/Release1.3.0.html clearly says that,
yasm-1.3.0 has a full support for shared objects. Then why it gives
aforesaid error. Can anyone please let me know if I am missing anything or
it is an issue with yasm? Thank you in advance for your support and time.
Please feel free to let me know if additional information is needed.
Here are the procedures followed to configure and install yasm.
wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
tar -xvzf yasm-1.3.0.tar.gz
cd yasm-1.3.0
./configure && make -j 4 && sudo make install
[root@local code]# /usr/bin/yasm --version
yasm 1.3.0
Compiled on Jul 28 2016.
Copyright (c) 2001-2014 Peter Johnson and other Yasm developers.
Run yasm --license for licensing overview and summary.
[root@ local code]#
Here are the complier flags and assembler flags used in Makefile.
LIB=libIPSec_MB.a
YASM=/nfs/site/disks/iots4/engineering/cai_isa/tools/yasm-bdw/yasm
OBJ_DIR=obj
INCLUDE_DIRS := include .
INCLUDES := $(foreach i,$(INCLUDE_DIRS),-I $i)
CXX := g++
CC := gcc
CXXFLAGS := -g -D LINUX -D NDEBUG $(INCLUDES) -O2 -fPIC
ASMFLAGS := -f x64 -f elf64 -X gnu -g dwarf2 -D LINUX -D __linux__
$(INCLUDES)
Regards,
Chinmaya
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-users] Fwd: Undelivered Mail Returned to Sender
2016-07-28 4:49 ` [dpdk-users] Fwd: Undelivered Mail Returned to Sender Chinmaya Dwibedy
@ 2016-07-28 15:16 ` Declan Doherty
0 siblings, 0 replies; 2+ messages in thread
From: Declan Doherty @ 2016-07-28 15:16 UTC (permalink / raw)
To: Chinmaya Dwibedy, users
On 28/07/16 05:49, Chinmaya Dwibedy wrote:
> Hi All,
>
>
>
> I have downloaded the IPsec mult-buffer library (ipsec_043.zip) from Intel
> site (mentioned at http://dpdk.org/doc/guides-16.04/cryptodevs/aesni_mb.html)
> and compiled it using #make YASM=/usr/bin/yasm. Upon trying to create a
> shared library from static library using #gcc -shared -Wl,--whole-archive
> libIPSec_MB.a -o libIPSec_MB.so, it gives the below link error.
>
>
>
> /usr/bin/ld: libIPSec_MB.a(aes128_cntr_by4_sse.o): relocation R_X86_64_PC32
> against symbol `byteswap_const' cannot be used when making a shared object;
> recompile with -fPIC
>
> /usr/bin/ld: final link failed: Bad value
>
> collect2: error: ld returned 1 exit status
>
> [root@mgmt-rig-7 code]#
>
>
>
> The version of yasm is 1.3.0. The release note at
> http://yasm.tortall.net/releases/Release1.3.0.html clearly says that,
> yasm-1.3.0 has a full support for shared objects. Then why it gives
> aforesaid error. Can anyone please let me know if I am missing anything or
> it is an issue with yasm? Thank you in advance for your support and time.
> Please feel free to let me know if additional information is needed.
>
>
>
>
>
> Here are the procedures followed to configure and install yasm.
>
>
>
> wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
>
> tar -xvzf yasm-1.3.0.tar.gz
>
> cd yasm-1.3.0
>
> ./configure && make -j 4 && sudo make install
>
>
>
> [root@local code]# /usr/bin/yasm --version
>
> yasm 1.3.0
>
> Compiled on Jul 28 2016.
>
> Copyright (c) 2001-2014 Peter Johnson and other Yasm developers.
>
> Run yasm --license for licensing overview and summary.
>
> [root@ local code]#
>
>
>
> Here are the complier flags and assembler flags used in Makefile.
>
>
>
> LIB=libIPSec_MB.a
>
> YASM=/nfs/site/disks/iots4/engineering/cai_isa/tools/yasm-bdw/yasm
>
> OBJ_DIR=obj
>
> INCLUDE_DIRS := include .
>
>
>
> INCLUDES := $(foreach i,$(INCLUDE_DIRS),-I $i)
>
>
>
> CXX := g++
>
> CC := gcc
>
> CXXFLAGS := -g -D LINUX -D NDEBUG $(INCLUDES) -O2 -fPIC
>
> ASMFLAGS := -f x64 -f elf64 -X gnu -g dwarf2 -D LINUX -D __linux__
> $(INCLUDES)
>
>
>
> Regards,
>
> Chinmaya
>
Hey Chinmaya,
I've had a look at this this morning, unfortunately I'm not an expert in
assembly but it looks to me like the assembly code is not position
independent, the difficulty seems to be with some global parameters,
byteswap_const being the first among them and therefore cannot be linked
as a shared library. The first reply to this thread
(http://stackoverflow.com/questions/9341212/shared-object-in-x64-assembly-language)
on stack overflow suggests 2 options to handle this. I haven't had a
chance to test these solutions so I'm not sure on the implications to
performance or in general to the performance implication of using the
library in general as a shared library.
Regards
Declan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-07-28 15:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CAMHS8RHDBDWFv2DnML_7E21p9maaizxDCPz6Rg+Mnp=8pLsKag@mail.gmail.com>
[not found] ` <20160728044529.DDE6C3604BE@narya.tortall.net>
2016-07-28 4:49 ` [dpdk-users] Fwd: Undelivered Mail Returned to Sender Chinmaya Dwibedy
2016-07-28 15:16 ` Declan Doherty
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).