Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


/usr/bin/ld: Relocations in generic ELF (EM: 2)

Posted on 2012-03-29
Medium Priority
Last Modified: 2012-06-22
Hi all,
i got this error while doing make (compiling all my files tgt).
Can anybody tell me why is this happening, and how should i solve this?
because my codes runs fine on the other machine but not this.
Thanks in advance:)

$ make
gcc -o m1 matmul_main.o matmul_setup.o matmul_compute.o matmul_output.o -lm -lpthread
/usr/bin/ld: matmul_main.o: Relocations in generic ELF (EM: 2)
matmul_main.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make: *** [m1] Error 1

if my make is up-to-date, it gives me another error:
$ make
make: `m1' is up to date.
$ m1 5 10 5 2
-bash: m1: command not found
Question by:crazy4s
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
LVL 77

Accepted Solution

slightwv (䄆 Netminder) earned 2000 total points
ID: 37786963
I'm responding to a neglected question alert.  My 'make' expertise is pretty rusty.

Is this new code or have you compileed it before?

Have you tried a 'make clean' before the make?


Author Comment

ID: 37787516
yes i tried it my university's csa machine, it runs fine. but when i change to this (8core machines), it just give me the errors even after i do make clean.
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37787529
Do you have the source to:

or are you just copying them over?
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 37787552
okay just because i used m1 instead of ./m1 it gives me the above error!
anyway thanks, problem solved.
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37787556
Would you like to accept your post as the solution or just have the question deleted?
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37787564
AS much as I like the points, I don't feel that I earned them.

I would like to unaccept this and let you accept your post as the solution.

Just let me know.

Author Comment

ID: 37787565
hmm is okay other might have the possibility to bump into this error, so i'll just leave it:)
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37787574
>>other might have the possibility to bump into this error

But my post doesn't help resolve it.  Your post does.

Featured Post

Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.
Suggested Courses

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question