[Bug binutils/28719] DWARF-5 section names in PE/PEP and weak symbols in Cygwin

2022-08-20 Thread jojelino at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28719

gee  changed:

   What|Removed |Added

 CC||jojelino at gmail dot com

--- Comment #8 from gee  ---
Okay, Can I ask why this patch applied in binutils toolchain which targets
*-mingw32?
Also, Cygwin/MINGW64(which is alias of cygwin to their unix application)
employs their own linker script for their own cygwin1.dll which complicates the
problem furthermore. 

So cygwin maintainers should add dwarf5 debug section to that file accordingly.

It's very frustrating that former cygwin project lead had retired long ago...

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug binutils/28719] DWARF-5 section names in PE/PEP and weak symbols in Cygwin

2022-08-20 Thread jojelino at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=28719

--- Comment #9 from gee  ---
For someone who uses x86_64-w64-mingw32-binutils from cygwin, use below script
to patch the affected ld executable file. better than recompiling every stuff
to get your own.

###

f=/usr/bin/x86_64-w64-mingw32-ld.exe;for i in $(grep --text -b "===" $f| tail
+2|sed -e "s/:.*//"); do echo $i;sp="  "; echo "$sp"|dd if=/proc/self/fd/0
of=$f iflag=count_bytes,skip_bytes oflag=seek_bytes conv=notrunc seek=$i
count=${#sp};done
lines=$(grep --text -bP '(?:/\* Copyright|   
\*\(\.(?:z?debug_loclists|drectve)\))' $f|grep -E "Copyright" -A2|grep -E
"loclists"|sort -k2)
for i in $(echo "$lines"|head -6|sed -e "s/:.*//");do sp=" 
"; echo "$sp"|dd if=/proc/self/fd/0 of=$f iflag=count_bytes,skip_bytes
oflag=seek_bytes conv=notrunc seek=$i count=${#sp};done
for i in $(echo "$lines"|tail -6|sed -e "s/:.*//");do sp=" 
 "; echo "$sp"|dd if=/proc/self/fd/0 of=$f iflag=count_bytes,skip_bytes
oflag=seek_bytes conv=notrunc seek=$i count=${#sp};done

###

-- 
You are receiving this mail because:
You are on the CC list for the bug.