Fix compiling C demo apps #78
macpacheco
started this conversation in
Show and tell
Replies: 1 comment 4 replies
-
|
I cannot replicate the linking issue on my test linux system. I have updated the build script to not link gavare with crt0.o as it wasn't needed for that program and it was causing the image to be garbled. xubuntu 24.04 |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I was getting errors like:
crt0.c:(.text+0x27): relocation truncated to fit: R_X86_64_32S against `__bss_start'
When the C demos were being linked.
This goes away by changing CFLAGS in src/BareMetal-Demo/build.sh to include -fPIC
However gavare.app freezes with this change. It never returns to the Monitor prompt (waited 5 minutes). And no graphics are drawn.
I can't build gavare.app without -fPIC so I don't know if this is the culprit or not.
I'm running openSUSE Leap 15.3.
GCC 7.5.0
ld 2.39.0.20220810-150100.7.40
QEMU 5.2.0
On an AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx (AuthenticAMD family 23 model 24)
Beta Was this translation helpful? Give feedback.
All reactions