[Bug ld/24536] New: ld/ldbuildid.c: Incompatible pointer types in an assignment, -Werror/-Wcast-function-type
https://sourceware.org/bugzilla/show_bug.cgi?id=24536 Bug ID: 24536 Summary: ld/ldbuildid.c: Incompatible pointer types in an assignment, -Werror/-Wcast-function-type Product: binutils Version: 2.33 (HEAD) Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: pexu at sourceware dot mail.kapsi.fi Target Milestone: --- Created attachment 11765 --> https://sourceware.org/bugzilla/attachment.cgi?id=11765&action=edit Suppress the warning by doing a `VOID (WINAPI *)(VOID)' cast. Hello. `ld/ldbuildid.c' hasn't changed for a while, but as of GCC8 it will not compile as there's an assignment using incompatible pointer types on line 139: uuid_create = (UuidCreateFn) GetProcAddress (rpc_library, "UuidCreate"); There's nothing wrong with the statement except that GCC8 has a new warning -Wcast-function-type that is (correctly) hit. By default -Werror is used if using GCC and not doing a release. Attached a proposed patch. It basically does an extra (stylized) `void (*)(void)' cast, as suggested by GCC documentation. `*((FARPROC *) &uuid_create) = ...', a style used by some Windows APIs, will break strict-aliasing rules, so it causes more problems that what it solves. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/24523] ld -r -b binary fails with "failed to merge target specific data of file"
https://sourceware.org/bugzilla/show_bug.cgi?id=24523 --- Comment #1 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Nick Clifton : https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=79299211a1a9a701f146620d419da6ee0175798c commit 79299211a1a9a701f146620d419da6ee0175798c Author: Nick Clifton Date: Wed May 8 14:51:32 2019 +0100 Do not force the m68k-elf linker to fail if it encoutners a non-ELF format file. PR 24523 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Return TRUE rather than FALSE if encountering a non-ELF file. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/24523] ld -r -b binary fails with "failed to merge target specific data of file"
https://sourceware.org/bugzilla/show_bug.cgi?id=24523 Nick Clifton changed: What|Removed |Added Status|NEW |RESOLVED CC||nickc at redhat dot com Resolution|--- |FIXED --- Comment #2 from Nick Clifton --- Hi Andreas, OK - I have changed the merge_private_data function so that it returns TRUE instead of FALSE for non-ELF format input or output files. Cheers Nick -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/24536] ld/ldbuildid.c: Incompatible pointer types in an assignment, -Werror/-Wcast-function-type
https://sourceware.org/bugzilla/show_bug.cgi?id=24536 Nick Clifton changed: What|Removed |Added CC||nickc at redhat dot com --- Comment #1 from Nick Clifton --- Hi Pekka, > Attached a proposed patch. It basically does an extra (stylized) `void > (*)(void)' cast, as suggested by GCC documentation. Can I just check that the upper case VOID types in your patch are correct ? I am not familiar with the MinGW32 build environment, so I was wondering whether the patched line ought to read like this instead: uuid_create = (UuidCreateFn) (void (WINAPI *)(void)) GetProcAddress (rpc_library, "UuidCreate"); Cheers Nick -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/24536] ld/ldbuildid.c: Incompatible pointer types in an assignment, -Werror/-Wcast-function-type
https://sourceware.org/bugzilla/show_bug.cgi?id=24536 --- Comment #2 from Pekka Seppänen --- Hi Nick. It's purely syntactic sugar; I prefer to use traditional Win32 typedefs when dealing with Win32 API functions, as in this case. Either way will work just fine. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/24536] ld/ldbuildid.c: Incompatible pointer types in an assignment, -Werror/-Wcast-function-type
https://sourceware.org/bugzilla/show_bug.cgi?id=24536 --- Comment #3 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Nick Clifton : https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=46752c37b06c83a8cbf6be887beac4092d5e3505 commit 46752c37b06c83a8cbf6be887beac4092d5e3505 Author: Pekka Sepp?nen Date: Wed May 8 16:54:16 2019 +0100 Fix compile time warning when building the linker in a MinGw32 environment using gcc 8. PR 24536 * ldbuildid.c (generate_build_id): Cast return value from GetProcAddress in order to avoid a compile time warning. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/24536] ld/ldbuildid.c: Incompatible pointer types in an assignment, -Werror/-Wcast-function-type
https://sourceware.org/bugzilla/show_bug.cgi?id=24536 Nick Clifton changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #4 from Nick Clifton --- Hi Pekka, Great - in which case I have applied the patch with "void" rather than "VOID" as this looks better to me. Cheers Nick -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gas/24538] New: GAS crashes caused by corrupted input files
https://sourceware.org/bugzilla/show_bug.cgi?id=24538 Bug ID: 24538 Summary: GAS crashes caused by corrupted input files Product: binutils Version: 2.32 Status: UNCONFIRMED Severity: normal Priority: P2 Component: gas Assignee: unassigned at sourceware dot org Reporter: mtest1 at testlt dot pl Target Milestone: --- Created attachment 11767 --> https://sourceware.org/bugzilla/attachment.cgi?id=11767&action=edit input files and crash logs I would like to submit information about crashes in "GNU as" we've found. All crashes are caused by corrupted files (attached). There are many of them, so we've tried to group them for easier analysis (look at point 4). Found by: Mateusz Kocielski, Michal Dardas from LogicalTrust 1. Used machine CPU: Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz Ram: 8 GB OS: Kali Linux, 4.17.0-kali1-amd64 gcc version 8.1.0 (Debian 8.1.0-12) 2. Compilation process # git clone --depth 1 git://sourceware.org/git/binutils-gdb.git # cd binutils-gdb # LDFLAGS="-lasan" LDADD="-lasan" CFLAGS="-fsanitize=address -ggdb -O0" ./configure --enable-targets=all # make -j4 # cd gas # archs="alpha arm i386 ia64 mcore mips ppc rs6000 sh tic4x tic54x x86_64" \ for arch in $archs; do \ echo $arch ; \ make clean ; \ LDFLAGS="-lasan" LDADD="-lasan" CFLAGS="-fsanitize=address -ggdb -O0" ./configure --prefix=`pwd`/bin/ --target=$arch-elf ; \ make -j4 ; \ cp as-new as-$arch ; \ done \ 3. "as" version # for as in $(ls as-*); do echo "Binary: $as"; echo `./$as --version | grep ass`; done Binary: as-alpha GNU assembler (GNU Binutils) 2.32.51.20190414 This assembler was configured for a target of `alpha-elf'. Binary: as-arm GNU assembler (GNU Binutils) 2.32.51.20190414 This assembler was configured for a target of `arm-elf'. Binary: as-i386 GNU assembler (GNU Binutils) 2.32.51.20190414 This assembler was configured for a target of `i386-elf'. Binary: as-ia64 GNU assembler (GNU Binutils) 2.32.51.20190414 This assembler was configured for a target of `ia64-elf'. Binary: as-mcore GNU assembler (GNU Binutils) 2.32.51.20190414 This assembler was configured for a target of `mcore-elf'. Binary: as-mips GNU assembler (GNU Binutils) 2.32.51.20190414 This assembler was configured for a target of `mips-elf'. Binary: as-ppc GNU assembler (GNU Binutils) 2.32.51.20190414 This assembler was configured for a target of `ppc-elf'. Binary: as-rs6000 GNU assembler (GNU Binutils) 2.32.51.20190414 This assembler was configured for a target of `rs6000-elf'. Binary: as-sh GNU assembler (GNU Binutils) 2.32.51.20190414 This assembler was configured for a target of `sh-elf'. Binary: as-tic4x GNU assembler (GNU Binutils) 2.32.51.20190414 This assembler was configured for a target of `tic4x-elf'. Binary: as-tic54x GNU assembler (GNU Binutils) 2.32.51.20190414 This assembler was configured for a target of `tic54x-elf'. Binary: as-x86_64 GNU assembler (GNU Binutils) 2.32.51.20190414 This assembler was configured for a target of `x86_64-elf'. 4. Crashes There are 22 directories which names are related to a line of code at which a crash occurred. Every directory contains files using following convention: crash_{binary-name}_{test-case} - crash from ASAN {test-case} - test case file. To reproduce run as (in corresponding architecture): ./as {test-case} for example, directory ini386_output_nopsconfig_tc-i386.c:1302 contains files: crash_as-i386_nop-1.s_166.out.min - ASAN log, to reproduce: # as-i386 nop-1.s_166.out.min crash_as-i386_nop-6.s_i386_2750877559.out.min - ASAN log, to reproduce: # as-i386 nop-6.s_i386_2750877559.out.min crash_as-x86_64_nop-1.s_166.out.min - ASAN log, to reproduce: # as-x86_64 nop-1.s_166.out.min crash_as-x86_64_nop-6.s_i386_2750877559.out.min - ASAN log, to reproduce: # as-x86_64 nop-6.s_i386_2750877559.out.min nop-1.s_166.out.min - test case nop-6.s_i386_2750877559.out.min - test case -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/19921] enable specification of data width when writing verilog hex format
https://sourceware.org/bugzilla/show_bug.cgi?id=19921 Donato Kava changed: What|Removed |Added CC||donatokava at gmail dot com --- Comment #9 from Donato Kava --- Adding a comment here to ask if someone could actually work on this bug. I reported it on the RISC-V tools github here. https://github.com/riscv/riscv-tools/issues/168#issuecomment-358165027 When I first reported it was assumed it would have been fixed and pushed upstream by now. Apparently we were wrong and now someone else also wants the same functionality and found my original report. Can someone please fix this? This functionality is useful for bare metal RISC-V Verilog processors. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils