Re: Help required for GCC structure variable assignment optimization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



With -fno-plt, I see that there is reference to
*call    *memcpy@GOTPCREL(%rip)*

Excuse me if this is stupid question, but is it possible to instruct GCC to
insert plain memcpy
call here? (With no PLT or GOTPCREL or any other relocation)

Like this:
*call    memcpy*
(Similar to the case when -fPIE flag is not specified?)

--
GampuZ

On Wed, Jul 25, 2018 at 3:45 PM Xi Ruoyao <ryxi@xxxxxxxxxxxxxxxxx> wrote:

> On 2018-07-25 15:29 +0530, Gampu Z wrote:
> > Is there any way I can instruct GCC to insert call to memcpy and not to
> > memcpy@PLT?
>
> From <https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/Code-Gen-Options.html>:
>
> > -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.
> --
> Xi Ruoyao <ryxi@xxxxxxxxxxxxxxxxx>
> School of Aerospace Science and Technology, Xidian University
>



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux