Issue Details (XML | Word | Printable)

Key: PCC-259
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Anders Magnusson
Reporter: Iain Hibbert
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

struct arguments with -fPIC need to use memcpy@PLT

Created: 24/Feb/11 02:40 PM   Updated: 26/Feb/11 08:15 AM
Component/s: i386 target
Affects Version/s: None
Fix Version/s: None

Environment: NetBSD/i386

 Description  « Hide

the following code fragment

struct foo {
int a[20];

void foo(struct foo);

void bar(void)
struct foo f;


when compiled with pcc -fPIC -S generates a call to memcpy to copy the structure onto the stack. But, I believe that this should be memcpy@PLT as using the --warn-shared-textrel flag with ld generates a warning..

The code is generated by arch/i386/local2.c:starg()

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson added a comment - 26/Feb/11 08:15 AM
Good catch. Fix checked in now.