* [PATCH 1/1] iptables: patch to correct linker flag sequence
@ 2017-11-29 6:10 Jay Shah
2017-12-04 10:18 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Jay Shah @ 2017-11-29 6:10 UTC (permalink / raw)
To: netfilter-devel; +Cc: jay.shah1, Yogesh Prasad, Matt Weber
From: Yogesh Prasad <yogesh.prasad@rockwellcollins.com>
Description
This patch will correct the sequence of -pie and -shared options.
When used together, -pie should be provided to the linker before
-shared. If -pie is provided after -shared, the linker throws an
error shown below as example.
-------------------------------------------------------------------------
/host/lib/gcc/powerpc-buildroot-linux-gnu/6.4.0/../../../..
/powerpc-buildroot-linux-gnu/bin/ld: BFD (GNU Binutils) 2.28.1
assertion fail elf32-ppc.c:8923
collect2: error: ld returned 1 exit status
+ ./libxt_SYNPROXY.man
make[4]: *** [libxt_TCPOPTSTRIP.so] Error 1
+ ./libip6t_mh.man
/host/powerpc-buildroot-linux-gnu/sysroot/usr/lib/Scrt1.o:(.data+0x4):
undefined reference to `main'
/host/lib/gcc/powerpc-buildroot-linux-gnu + ./libxt_TCPMSS.man
/6.4.0/../../../../powerpc-buildroot-linux-gnu/bin/ld:
BFD (GNU Binutils) 2.28.1 assertion fail elf32-ppc.c:8923
collect2: error: ld returned 1 exit status
-------------------------------------------------------------------------
Signed-off-by: Yogesh Prasad <yogesh.prasad@rockwellcollins.com>
Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com>
---
extensions/GNUmakefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/extensions/GNUmakefile.in b/extensions/GNUmakefile.in
index b7a8a83..bee666e 100644
--- a/extensions/GNUmakefile.in
+++ b/extensions/GNUmakefile.in
@@ -101,7 +101,7 @@ init%.o: init%.c
# Shared libraries
#
lib%.so: lib%.oo
- ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $< -L../libxtables/.libs -lxtables ${$*_LIBADD};
+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} ${LDFLAGS} -shared -o $@ $< -L../libxtables/.libs -lxtables ${$*_LIBADD};
lib%.oo: ${srcdir}/lib%.c
${AM_VERBOSE_CC} ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -D_INIT=lib$*_init -DPIC -fPIC ${CFLAGS} -o $@ -c $<;
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] iptables: patch to correct linker flag sequence
2017-11-29 6:10 [PATCH 1/1] iptables: patch to correct linker flag sequence Jay Shah
@ 2017-12-04 10:18 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2017-12-04 10:18 UTC (permalink / raw)
To: Jay Shah; +Cc: netfilter-devel, Yogesh Prasad, Matt Weber
On Wed, Nov 29, 2017 at 12:10:54AM -0600, Jay Shah wrote:
> From: Yogesh Prasad <yogesh.prasad@rockwellcollins.com>
>
> Description
> This patch will correct the sequence of -pie and -shared options.
> When used together, -pie should be provided to the linker before
> -shared. If -pie is provided after -shared, the linker throws an
> error shown below as example.
>
> -------------------------------------------------------------------------
> /host/lib/gcc/powerpc-buildroot-linux-gnu/6.4.0/../../../..
> /powerpc-buildroot-linux-gnu/bin/ld: BFD (GNU Binutils) 2.28.1
> assertion fail elf32-ppc.c:8923
> collect2: error: ld returned 1 exit status
> + ./libxt_SYNPROXY.man
> make[4]: *** [libxt_TCPOPTSTRIP.so] Error 1
> + ./libip6t_mh.man
> /host/powerpc-buildroot-linux-gnu/sysroot/usr/lib/Scrt1.o:(.data+0x4):
> undefined reference to `main'
> /host/lib/gcc/powerpc-buildroot-linux-gnu + ./libxt_TCPMSS.man
> /6.4.0/../../../../powerpc-buildroot-linux-gnu/bin/ld:
> BFD (GNU Binutils) 2.28.1 assertion fail elf32-ppc.c:8923
> collect2: error: ld returned 1 exit status
> -------------------------------------------------------------------------
Applied.
Out of curiosity: Does it say anywhere that the options need to be in
a specific order, eg. documentation.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-04 10:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-29 6:10 [PATCH 1/1] iptables: patch to correct linker flag sequence Jay Shah
2017-12-04 10:18 ` Pablo Neira Ayuso
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).