Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

relocation in read-only section .text' #45

Open
bahare74 opened this issue Jan 19, 2023 · 0 comments
Open

relocation in read-only section .text' #45

bahare74 opened this issue Jan 19, 2023 · 0 comments

Comments

@bahare74
Copy link

bahare74 commented Jan 19, 2023

Hello.
I am using gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
I created a library and called it in main.
I want to compile my main with gcc (using gcc -m32 -c main.c -o main.o)
and compile my library with movcc (using movcc -m32 -c library.c -o library.o).
These two procedures have been done correctly,
My problem is with creating an executable file (using gcc -m32 main.o library.o -o main)
it returns a warning /usr/bin/ld: library.o: warning: relocation in read-only section .text'
and also there are so many parameters that seem undefined to the compiler, like:
/usr/bin/ld: (.text+0xb): undefined reference to 'alu_x'
...
finally there are these two warning and error:
/usr/bin/ld: warning: creating DT_TEXTREL in PIE
collect2: error: ld returned 1 exit status

Is there any solution to solve this problem?
Thanks for any help in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant