这是indexloc提供的服务,不要输入任何密码
Skip to content

relocation in read-only section .text' #45

@bahare74

Description

@bahare74

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions