Help required for GCC structure variable assignment optimization

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

 



Hello,


I need some help for GCC inserting call to memcpy@PLT when structure
variable

assignments are used.


I have a sample code which contains a structure variable assignments.

[  0] [15:21:40] root@localhost : # cat b.c

struct foo_t {

        int x[1048576];

} foo0;


void bar(struct foo_t* foo)

{

        struct foo_t foo1;

        foo1 = *foo;

}


int main()

{

        bar(&foo0);

        return 0;

}


# /usr/src/gcc-6.1.0/build/bin/gcc -fPIE -S b.c

This leads to GCC compiler issuing a call to memcpy@PLT()


I have tried with various options like -fno-builtin, -fno-builtin-function,
-fno-tree-loop-distribute-patterns but even with all these options, if -fPIE
flag is present I see that there is reference to memcpy@PLT.


Is there any way I can instruct GCC to insert call to memcpy and not to
memcpy@PLT?

--

GampuZ



[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