Welcome! Log In Create A New Profile

Advanced

Re: Want to use --emit-relocs in the linker step

Andrei Belov
April 27, 2020 10:00AM
> On 27 Apr 2020, at 16:53, Mahmood Naderan <mahmood.nt@gmail.com> wrote:
>
> Hi,
> I want to add '--emit-relocs' at the linker stage while building nginx, I have edited the objs/Makefile to be like this:
>
> $(LINK) -o objs/nginx \
> objs/src/core/nginx.o \
> ....
> objs/ngx_modules.o \
> -ldl -lpthread -lcrypt -lpcre -lz --emit-relocs \
> -Wl,-E
>
>
> However, I get this error
>
> cc: error: unrecognized command line option '--emit-relocs'
>
> Any idea to fix that?

As it is linker option, you should use -Wl,--emit-relocs instead.

Also, the better way is to specify linker options via "--with-ld-opt" nginx configure option, e.g.:

../configure --with-ld-opt="-Wl,--emit-relocs"


HTH,

-- Andrei
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Want to use --emit-relocs in the linker step

Mahmood Naderan April 27, 2020 09:56AM

Re: Want to use --emit-relocs in the linker step

Andrei Belov April 27, 2020 10:00AM

Re: Want to use --emit-relocs in the linker step

Mahmood Naderan April 27, 2020 10:16AM

Re: Want to use --emit-relocs in the linker step

Maxim Dounin April 27, 2020 10:54AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 174
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready