Skip to content

gio/tests: Use compiler instead of ld to generate test_resources.o

YunQiang Su requested to merge yqsu/glib:main into main

Currently, we generate objects from gresource by: ld -r -b binary -z noexecstack which has some problems:

  1. some non bfd linker may not support it, such as mold/lld.
  2. ld has fewer machine info than gcc.

In the new approach, we generate a asm file: .data .incbin some/resouce and the build it with $(CC) -c -Wa,--noexecstack -x assembler

This can fix: #2768 (closed), #2720 (closed).

Merge request reports