Re: Help required for GCC structure variable assignment optimization

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

 



On 2018-07-27 10:09 +0530, Gampu Z wrote:
> Hello,
> 
> I see that this strategy adds extra instructions to my binary assembly.
> Is there any way, I can instruct GCC to make reference to just memcpy.
> 
> I see there are various other function calls in my program but none of them
> have PLT suffix. My binary is a standalone binary in which I am providing
> memcpy
> implementation. Why is it that just GCC inserted optimization of calling
> memcpy for
> structure variable assignment results in memcpy@PLT to be put in assembly?

The linker can handle this and call your memcpy instead of libc memcpy even
if GCC generate "memcpy@PLT" in the asm code.

`objdump -d` your executable and you'll see that.
--
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