I wrote a program which uses strcpy. It passes compilation stage, but fails when executing the program.
With gdb it shows that no such file or directory for strcpy-sse2.S
_strcpy_sse2 () at ../sysdeps/i386/i686/multiarch/strcpy-sse2.S:2099
2099 ../sysdeps/i386/i686/multiarch/strcpy-sse2.S: No such file or directory.
Compiling with a simple program
#include <string.h>
#include <stdio.h>
int main(int argc, char **argv)
{
char *str;
strcpy(str, "hello");
printf("say %s\n", str);
return 0;
}
also has the same problem. The program simply fails with segment fault.
My debian is kernel 4.0.0-2-rt-686-pae, and gcc (Debian 4.9.2-10) 4.9.2
How to fix this error?
Thanks
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
[SOLVED] strcpy-sse2.S No such file or directory
-
- Posts: 156
- Joined: 2006-07-13 08:04
- Has thanked: 3 times
[SOLVED] strcpy-sse2.S No such file or directory
Last edited by shogun1234 on 2015-08-30 02:53, edited 1 time in total.
-
- Posts: 1403
- Joined: 2009-09-10 20:15
- Location: Saint-Petersburg, Russian Federation
- Been thanked: 11 times
Re: strcpy-sse2.S No such file or directory
You are not allocated memory for str. Write
or how you needed. If is needed very much, use alloc() and free().
Peter.
Code: Select all
char str[16];
Peter.
-
- Posts: 156
- Joined: 2006-07-13 08:04
- Has thanked: 3 times
-
- Posts: 202
- Joined: 2013-06-19 05:09
Re: [SOLVED] strcpy-sse2.S No such file or directory
As far as the gdb stuff you need the development versions of your libraries installed, it's looking for the assembly for your standard libraries and you don't have that on your system.
Much opinionated.
Some abrasive.
No systemd.
Wow.
Some abrasive.
No systemd.
Wow.