From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 7F4833858C66 for ; Wed, 10 May 2023 11:38:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7F4833858C66 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1683718690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ha3871vAzg7erHHR7QNt+e+aghUwuSauMhXpo5flUHM=; b=i57Eejq7C4i0vMk4g8Zpl43YJI70vni5lPGEJ8HRx2VOs9jyNqoEZ669UiTFSrKZUXbtS3 zxmctsDEh7qiIC+MRzygySb0Wpivw6B0fV15GdByKI3hHP7uJ4/3oqsbitJSkBn3LM7hfB hXnmBPOZGZ59v8OH6rwli+CL+bRlXxE= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-130-R1XrhblWNMyIPdQHgLi3Gg-1; Wed, 10 May 2023 07:38:09 -0400 X-MC-Unique: R1XrhblWNMyIPdQHgLi3Gg-1 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-3062e5d0cd3so2813207f8f.3 for ; Wed, 10 May 2023 04:38:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683718687; x=1686310687; h=content-transfer-encoding:in-reply-to:subject:from:references:to :content-language:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ha3871vAzg7erHHR7QNt+e+aghUwuSauMhXpo5flUHM=; b=CWtW7ZVrjsJagejqLfbIyEsQKA7/GgDUdME5AJrvPTKV5/6nla27z6kwNXlbBwPXAt Jz58QOOMM2pr1IWNbqvXXCwuAw8D3gxN4/SG4tNZlnfC6Sw/aQ3iocV85btbtmj7NVXu k47WcHw7Yc+Qcyo4qETqVLHY7trllPNUEjkIrEnqWED0Z+H0p1qqYsn9alISsN1Bp+/W M4qXsJ03RPHcfGjRl1PvnoL0dmAUL/6eqzGzL89QPpTxHSq5HlPYhhMdMNLeYOdN/3j5 NGsvHKfpltiRKTL3CQ91kxmcEBWGLHt5VoVnDQRtMoN1weZ67Pgz1aZPKeOhJMQ1+OX0 Tg9w== X-Gm-Message-State: AC+VfDwbIytsR7MybKP4LiwTDJGZlZiKyYBySUxZ/mBHrsc+5xyVCiPZ 5JmUHRzaMSq+iCZAJKYDNewiqockSxvD/78w3CeLuLgqPKmvCWmaDrzcpljsWBxkFoDxb8cbvM/ QMh97JgOTS5ndufkh6PHr6pYlYw== X-Received: by 2002:adf:f20f:0:b0:307:acbb:2a7b with SMTP id p15-20020adff20f000000b00307acbb2a7bmr2079742wro.34.1683718687765; Wed, 10 May 2023 04:38:07 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7NVBSI2OXT4mKsYuPXBb8BkDxgdrgQ9Z2jFfeLzgx1cnuosDZunpJObzi8zMEN0HmG1AFksw== X-Received: by 2002:adf:f20f:0:b0:307:acbb:2a7b with SMTP id p15-20020adff20f000000b00307acbb2a7bmr2079727wro.34.1683718687452; Wed, 10 May 2023 04:38:07 -0700 (PDT) Received: from [192.168.1.7] ([79.123.86.193]) by smtp.gmail.com with ESMTPSA id z17-20020a1c4c11000000b003ee20b4b2dasm22381423wmf.46.2023.05.10.04.38.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 10 May 2023 04:38:07 -0700 (PDT) Message-ID: <831c6d67-e502-1cb2-b68c-956c354c968b@redhat.com> Date: Wed, 10 May 2023 12:38:06 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 To: Tom Kacvinsky , Binutils References: From: Nick Clifton Subject: Re: ld --base-file option, dlltool generated exp files In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-GB Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Tom, > What I found through lots of experimentation is that either the base file > generated by ld or the exp file generated by dlltool is off and is making > a DLL that causes our applications to crash > The reason I say it's either the base file or the exp file is that I can > take my export definition file (a .def file) and generate an import library > and exp file using Microsoft's lib tool, and that exp file makes the final > link produce a DLL that does not have an issue. > I have a way around the problem without using a base file (just pass the > .def file directly to ld so that an export table is generated), but I > wanted to report this issue. Thank you for doing this. It always helps when problems are reported, even if we do not have a solution available. Please could you file a bug report here: https://sourceware.org/bugzilla/enter_bug.cgi?product=binutils > What would be most useful for a reproducer? I think I am going to have a > difficult time paring our code down to an MRE, and I'm reluctant to > release IP object code Understood. A stand alone reproducer would be ideal, but if that is not possible then some further details on the problem would definitely help. For example - are you able to identify what is wrong the the DLLs being produced by the linker ? Do any of the various PE-file checker programs that are out there report any problems ? Also - do you know if they problem happens with older versions of the binutils, eg 2.35 or 2.36 ? Possibly the problem is due to a (relatively) recent change to the linker. I cannot make any guarantees, but I will definitely look at any bug reports you file. Cheers Nick