tcpdump mailing list archives

-fPIC for libnetdissect


From: Michael Richardson <mcr () sandelman ca>
Date: Sun, 30 Oct 2016 12:18:54 -0400

When building libnetdissect into a virtual switch (uml_netjig), I started to
get:
   /usr/bin/ld: /home/mcr/stuff/x86_64/tcpdump-4.8.1/libnetdissect.a(print-ripng.o): relocation R_X86_64_32 against 
`.rodata' can not be used when making a shared object; recompile with -fPIC

which is odd, since I'm not trying to make a shared object, just a final link
of the executable.  But, adding -fPIC to the build works.

a) any reason we shouldn't build with -fPIC when using gcc?
b) any advince in a way that doesn't shoot non-gcc builds in the foot?


--
]               Never tell me the odds!                 | ipv6 mesh networks [
]   Michael Richardson, Sandelman Software Works        | network architect  [
]     mcr () sandelman ca  http://www.sandelman.ca/        |   ruby on rails    [

_______________________________________________
tcpdump-workers mailing list
tcpdump-workers () lists tcpdump org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers


Current thread: