Accessing fields in the global_options structure from out-of-sync plugins

2020-08-14 Thread Nick Clifton via Gcc
Hi Guys, With the annobin plugin for gcc I have a problem accessing some of the fields in the global_options structure. Although the plugin can use the macros defined in options.h, this only works if the plugin is in sync with gcc. If the plugin was built for one version of gcc, but ru

Re: Making *-netbsd-* to mean ELF not a.out for all CPUs

2021-06-14 Thread Nick Clifton via Gcc
Hi John, But they did offer some tentative support for my second suggestion of changing the meaning of bare "netbsd" --- "netbsdaout" would still be available to unambiguously request a.out for anyone that wants it. I think that this would be OK for the binutils, providing that when configur

Re: [CVE] zlib (< 1.2.12) memory corruption

2022-04-08 Thread Nick Clifton via Gcc
Hi Luis, There is a CVE [1] for zlib < 1.2.12 (released march 27th). GCC currently uses zlib 1.2.11, and binutils-gdb imports the zlib directory from GCC. The recommendation is to get it updated to 1.2.12, which contains the proper fix [2]. I am all for updating the binutils-gdb copy of zli

Re: [CVE] zlib (< 1.2.12) memory corruption

2022-04-12 Thread Nick Clifton via Gcc
Hi Luis, There is a CVE [1] for zlib < 1.2.12 (released march 27th). GCC currently uses zlib 1.2.11, and binutils-gdb imports the zlib directory from GCC. The recommendation is to get it updated to 1.2.12, which contains the proper fix [2]. Right - I have now updated the binutils-gdb mainl

Re: [committed] exec-stack warning for test which wants executable stacks

2022-04-25 Thread Nick Clifton via Gcc
Hi Jeff, I used -z execstack rather than --no-warn-execstack as the former is recognized by older versions of ld, but the latter is a new option. Thanks for it. Unfortunately, I should have looked at the other failures that have popped up over the last week.  Essentially all the nested functio

Re: [committed] exec-stack warning for test which wants executable stacks

2022-04-25 Thread Nick Clifton via Gcc
Hi Jeff, Just FYI - I am also looking at adding in another warning. This time for when the linker creates a PT_LOAD segment which has all of the RWX flags set. At the moment my testing seems to show that it only causes problems when a custom linker script is used that defines its own pr

Re: Counting static __cxa_atexit calls

2022-08-23 Thread Nick Clifton via Gcc
Hi Florian, What would be the most ELF-flavored way to implement this? After the final link, I expect that the count (or counts, we need a separate counter for thread-local storage) would show up under a new dynamic tag in the dynamic segment. This is actually a very good fit because older loa

Re: Forward GCC '-v' command-line option to binutils assembler, linker (was: [PING] nvptx: forward '-v' command-line option to assembler, linker)

2022-09-22 Thread Nick Clifton via Gcc
Hi Thomas, +/* Linker supports '-v' option. */ +#define LINK_SPEC "%{v}" ..., Tom rightfully asked: [...] I wonder, normally we don't pass -v to ld, and need -Wl,-v for that. So, on my quest for making things uniform/simple, I now wonder: should we also forward GCC '-v' to binutils linke

Re: Error: attempt to get value of unresolved symbol `L0'

2022-10-11 Thread Nick Clifton via Gcc
Hi Pali, Hi Richard, Interesting... Another test case which is working fine: kernoffs: .word 0x4 - (. - 0x0) This works because this expression can be converted into an instruction and a relocation in the object file: % as t.s -o t.o % objdump -dr t.o Disassembly of section .

Re: Error: attempt to get value of unresolved symbol `L0'

2022-10-11 Thread Nick Clifton via Gcc
Hi Pali, Hi Richard, Having file name and line number would be also useful as it took me some time to figure out where is the issue... Right - I have tried a little harder and come up with a follow up patch. This is now checked in, and given an input file that looks like this: % cat t.s k

Re: Problems when building NT kernel drivers with GCC / LD

2023-01-03 Thread Nick Clifton via Gcc
Hi Pali, Hello! I would like to remind this thread for gcc/binutils developers. Most of these issues are still present and cause problems for compiling native PE binary. If you have questions or you need any other information please let me know. Have bug reports been filed for the individual i

Re: Problems when building NT kernel drivers with GCC / LD

2023-04-12 Thread Nick Clifton via Gcc
Hi Pali, Hello! Just for a record, I filled individual issues to bugzilla: https://sourceware.org/bugzilla/show_bug.cgi?id=30004 https://sourceware.org/bugzilla/show_bug.cgi?id=30139 https://sourceware.org/bugzilla/show_bug.cgi?id=30140 https://sourceware.org/bugzilla/show_bug.cgi?id=30141 https