public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: ralph engels <ralphengels@gmail.com>
To: mingw-w64-public@lists.sourceforge.net,
	"Martin Storsjö" <martin@martin.st>
Cc: gcc@gcc.gnu.org, binutils@sourceware.org
Subject: Re: [Mingw-w64-public] Problems when building NT kernel drivers with GCC / LD
Date: Sun, 30 Oct 2022 20:58:39 +0100	[thread overview]
Message-ID: <67372f0f-3298-8f3d-fbce-c709ff487d0c@gmail.com> (raw)
In-Reply-To: <4c814dba-6383-b2b3-e2fc-35a89c78acbf@martin.st>

i think most of it stems from binutils tools being geared towards linux 
driver development ? and since noone before has shown much interrest in 
developing drivers for windows using the gnu tools. I also think that 
there might be some pitfalls -> incompatible exception models for one 
(most mingw based compilers today use dwarf unwinders for 32 bit maybe a 
few who use sjlj) the problem with that is that atleast 32 bit windows 
cannot do anything with this exception model sjlj is a little better in 
that regard but still. If done in pure C or asm it could work if those 
options were avaliable but it does limit the scope i think.

Den 30-10-2022 kl. 08:06 skrev Martin Storsjö:
> On Sun, 30 Oct 2022, Pali Rohár wrote:
>
>> * LD --dynamicbase is not working correctly. If used for PE executables
>>  (not dynamic libraries) then it does *not* generate relocation info.
>>  And without relocation info in PE binary, it is not possible to
>>  relocate base address. Which makes dynamic base non-working.
>
> I don't know about the rest, but this one sounds familiar to me. But 
> IIRC this one was fixed semi-recently (1-2 years ago), while making 
> --dynamicbase the default.
>
> I think it was fixed in this binutils commit:
>
> commit 514b4e191d5f46de8e142fe216e677a35fa9c4bb
> Author: Jeremy Drake <sourceware-bugzilla@jdrake.com>
> Date:   Thu Aug 27 12:58:27 2020 +0100
>
>     Change the default characteristics of DLLs built by the linker to 
> more secure settings.
>
> This commit is included in binutils 2.36 and later.
>
> // Martin
>
> _______________________________________________
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

  reply	other threads:[~2022-10-30 19:58 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-30  0:06 Pali Rohár
2022-10-30  7:06 ` [Mingw-w64-public] " Martin Storsjö
2022-10-30 19:58   ` ralph engels [this message]
2022-10-31  9:55 ` Jan Beulich
2022-11-05  0:57   ` Pali Rohár
2022-11-05  1:26     ` Pali Rohár
2022-11-20 13:10       ` Pali Rohár
2022-11-21  7:24         ` Jan Beulich
2022-11-26 19:04           ` Pali Rohár
2022-11-28  8:07             ` Jan Beulich
2022-11-28  8:40               ` Jonathan Wakely
2022-11-28  9:06                 ` Jan Beulich
2022-12-26 10:47 ` Pali Rohár
2023-01-03 11:06   ` Nick Clifton
2023-02-20 18:25     ` Pali Rohár
2023-04-01  9:23       ` Pali Rohár
2023-04-12  9:53         ` Nick Clifton
2023-04-12 20:40           ` Pali Rohár
2024-01-07  1:55       ` Pali Rohár
2024-04-07 23:20         ` Pali Rohár

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=67372f0f-3298-8f3d-fbce-c709ff487d0c@gmail.com \
    --to=ralphengels@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=gcc@gcc.gnu.org \
    --cc=martin@martin.st \
    --cc=mingw-w64-public@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).