Thomas-Tsai / partclone

Partclone provides utilities to backup a partition smartly and it is designed for higher compatibility of the file system by using existing library.
GNU General Public License v2.0
306 stars 104 forks source link

fail-mbr: Remove binutils section .note.gnu.build-id using objcopy #211

Closed robert-scheck closed 1 year ago

robert-scheck commented 1 year ago

GNU Binutils 2.36 configures with --enable-x86-used-note by default for Linux/x86. This adds the new section .note.gnu.build-id, which needs to be removed.

When building fail-mbr.o with current binutils, ld links the file into an executable format. However this is not accepted by current binutils for building fail-mbr.image; thus it requires -Wl,--relocatable for the former and -Wl,--no-dynamic-linker for the latter.

See also:

Fixes: #159