You are not logged in.

#1 2023-03-08 14:55:12

Utini
Member
Registered: 2015-09-28
Posts: 481
Website

[Solved] What does -fno-plt in makepkg do?

I couldn't find any reference to "-fno-plt" that is mentioned in the arch wiki of makepkg.
What does it actually do?

See: https://wiki.archlinux.org/title/makepk … d_binaries

Last edited by Utini (2023-03-08 18:38:42)


Setup 1: Thinkpad T14s G3, 14" FHD - R7 6850U - 32GB RAM - 2TB Solidigm P44 Pro NVME
Setup 2: Thinkpad X1E G1, 15.6" FHD - i7-8850H - 32GB RAM - NVIDIA GTX 1050Ti - 2x 1TB Samsung 970 Pro NVME
Accessories: Filco Majestouch TKL MX-Brown Mini Otaku, Benq XL2420T (144Hz), Lo(w)gitech G400, Puretrak Talent, Sennheiser HD800S + Meier Daccord FF + Meier Classic FF

Offline

#2 2023-03-08 15:08:51

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,255

Re: [Solved] What does -fno-plt in makepkg do?

Those are CFLAGS so flags that are passed to the compiler (for most cases GCC) and are relevant for the compilation process, not makepkg per se. if you google for the token with "-fno-plt" (including the quotation marks as to not trigger the negation of the - sign) you will land on the relevant GCC page

Code Gen Options wrote:

-fno-plt

    Do not use the PLT for external function calls in position-independent code. Instead, load the callee address at call sites from the GOT and branch to it. This leads to more efficient code by eliminating PLT stubs and exposing GOT loads to optimizations. On architectures such as 32-bit x86 where PLT stubs expect the GOT pointer in a specific register, this gives more register allocation freedom to the compiler. Lazy binding requires use of the PLT; with -fno-plt all external symbols are resolved at load time.

    Alternatively, the function attribute noplt can be used to avoid calls through the PLT for specific external functions.

    In position-dependent code, a few targets also convert calls to functions that are marked to not use the PLT to use the GOT instead.

https://gcc.gnu.org/onlinedocs/gcc/Code … tions.html

To understand what PLT and GOTs are this has some further references: https://reverseengineering.stackexchang … is-plt-got

Offline

#3 2023-03-08 17:26:14

Utini
Member
Registered: 2015-09-28
Posts: 481
Website

Re: [Solved] What does -fno-plt in makepkg do?

Oh.. googling with "" gave results. Thanks lol.


Setup 1: Thinkpad T14s G3, 14" FHD - R7 6850U - 32GB RAM - 2TB Solidigm P44 Pro NVME
Setup 2: Thinkpad X1E G1, 15.6" FHD - i7-8850H - 32GB RAM - NVIDIA GTX 1050Ti - 2x 1TB Samsung 970 Pro NVME
Accessories: Filco Majestouch TKL MX-Brown Mini Otaku, Benq XL2420T (144Hz), Lo(w)gitech G400, Puretrak Talent, Sennheiser HD800S + Meier Daccord FF + Meier Classic FF

Offline

#4 2023-03-08 17:28:40

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,255

Re: [Solved] What does -fno-plt in makepkg do?

Yes a - on google is interpreted as a negation as in you are looking for a page that does not include the words you negate, youd normally use that to get hits that include a search term but not another. if you add the "" then the search is taken literally as the term you're looking for.

Offline

Board footer

Powered by FluxBB