Skip to content

coova-chilli: Fix compile problem with _init()#19177

Merged
neheb merged 1 commit into
openwrt:masterfrom
hauke:coova-chilli-compile
Aug 21, 2022
Merged

coova-chilli: Fix compile problem with _init()#19177
neheb merged 1 commit into
openwrt:masterfrom
hauke:coova-chilli-compile

Conversation

@hauke

@hauke hauke commented Aug 15, 2022

Copy link
Copy Markdown
Member

Maintainer: @teslamint
Compile tested: aarch64/glibc
Run tested: no

The _init() function collides with a _init() function in crti.o.
This results in the following error in OpenWrt:
arc-openwrt-linux-gnu/bin/ld: libxt_coova.o: in function `_init':
/lib/gcc/arc-openwrt-linux-gnu/11.3.0/crti.o:(.init+0x4): first defined here
collect2: error: ld returned 1 exit status
make[7]: *** [Makefile:22: libxt_coova.so] Error 1

Fix this by suing a constructor attribute instead. This function will
still be called after the shared library was loaded.

Signed-off-by: Hauke Mehrtens hauke@hauke-m.de

Send upstream here: coova/coova-chilli#556

The _init() function collides with a _init() function in crti.o.
This results in the following error in OpenWrt:
arc-openwrt-linux-gnu/bin/ld: libxt_coova.o: in function `_init':
/lib/gcc/arc-openwrt-linux-gnu/11.3.0/crti.o:(.init+0x4): first defined here
collect2: error: ld returned 1 exit status
make[7]: *** [Makefile:22: libxt_coova.so] Error 1

Fix this by suing a constructor attribute instead. This function will
still be called after the shared library was loaded.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
@neheb neheb merged commit 55297e4 into openwrt:master Aug 21, 2022
@hauke hauke deleted the coova-chilli-compile branch November 8, 2022 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants