delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2021/11/25/15:56:11

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20210112;
h=message-id:date:mime-version:user-agent:subject:content-language:to
:references:from:in-reply-to:content-transfer-encoding;
bh=xWGvPD9N9G3SeBaWUdrA7GFm35vGYLYBa/+F+Ilwwbs=;
b=bTEGy7S/tdQSFsDZOrXtFVW7+8+BtVPRmRmSfUQw6x3kpip8BTcrMBrpC5jHWJj1Qy
fOcfZN1pCDHXAhCGOD2wcXtfDKqv1ImMy5IV32s7WeCATL5RCCfzNHQHfEwzjNTED6BW
CXUcfetczGZMxPzvHpbU8pUbw2XLrFqdLpuy2bZanWY9SkoPb9TmlVhYBvxY0bAC7fiB
c6Gf+Tb93tiG7NG9Svdlzw1+LR/b2znY/H8ViUAt56Zdd66VaWjBwt4tm50GuY0XR3MP
xmS1TYATrx0dOndw19Zy78PtkS5tSQ1cOuBV4Az9Qn/20CknxxCR4H4XI0vSr9p5zoCE
oJbg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:message-id:date:mime-version:user-agent:subject
:content-language:to:references:from:in-reply-to
:content-transfer-encoding;
bh=xWGvPD9N9G3SeBaWUdrA7GFm35vGYLYBa/+F+Ilwwbs=;
b=LJA5sQm6Kblh1NmD80tqtFNazTCISovivxqiI9U2tKw3L2mTn5fL3nzI0XrQav6kMN
9SOK+hmj6BB0OeFW1F/eRHlhKY0imbFgyj3zJU6fEBvHUEpQIB9JudzLFITCDupyHpxA
EJBKDLZpF29juKt6mIOge5wxo06rKWOoz03ClWcSvZ0H+dMfJ8KbWzeUzQwDmFTO7tr5
fezdzv5B+4bYuR4hKZ0m2+EAze+nhQlcmN9njOQc43WsEGiGy6/6MXLsTrUSxSbUuqO1
8+Fu3TyrkDS0zMttPiYPHCvJN+uBhUCN41oRi0J1IVouGEiBAxrDxRzEDF3YWp3xhka0
+Lqg==
X-Gm-Message-State: AOAM533He890LAC8UF4knPqf6wUeaBANSY12g5mFX6h9eDUccsMXoBbY
dSYTdK1gc+/NMHRu2ECYth9dNPY7TFI=
X-Google-Smtp-Source: ABdhPJxeKOtJ3J7auRcD7zROa5/3GtKH+Wf4KBurDSHdSQ5saov8e3SQqKrtosCtWbTaMSYq9W03tw==
X-Received: by 2002:a05:6402:2809:: with SMTP id h9mr42761289ede.351.1637873761511;
Thu, 25 Nov 2021 12:56:01 -0800 (PST)
Message-ID: <1c471a25-63c8-5ce7-579a-155672ae4533@gmail.com>
Date: Thu, 25 Nov 2021 21:56:00 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.3.2
Subject: Re: ANNOUNCE: DJGPP port of GNU binutils 2.37 uploaded.
To: djgpp AT delorie DOT com
References: <202111250613 DOT 1AP6DO6D009328 AT delorie DOT com>
<88bc8cb0-5e80-077e-be3a-22f4ab72b508 AT gmail DOT com> <619FBE0B DOT 5030508 AT gmx DOT de>
From: "J.W. Jagersma (jwjagersma AT gmail DOT com) [via djgpp AT delorie DOT com]" <djgpp AT delorie DOT com>
In-Reply-To: <619FBE0B.5030508@gmx.de>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On 2021-11-25 17:47, Juan Manuel Guerrero (juan DOT guerrero AT gmx DOT de) [via djgpp AT delorie DOT com] wrote:
> Am 25.11.2021 13:07, schrieb J.W. Jagersma (jwjagersma AT gmail DOT com) [via djgpp AT delorie DOT com]:
>> On 2021-11-25 06:54, Juan Manuel Guerrero (juan DOT guerrero AT gmx DOT de) [via djgpp-announce AT delorie DOT com] wrote:
>>> This is a port of GNU binutils 2.37 to MSDOS/DJGPP.
>>
>> Hi, thanks for this release.
>>
>>>   - The linker script changes, are based on the diff files taken from Andris
>>>     Pavenis' bnu219s2.zip and djcross-binutils-2.19.1-10ap.src.rpm.  Both are
>>>     available at ftp.delorie.com and mirrors.
>>>     I have only made those adjustments necessaries to get those patches fit
>>>     with the current source files.
>>
>> Recent binutils (>= 2.35) and gcc (>= 10.1) will create .bss.* sections with
>> the correct attributes, so this hack is no longer necessary. Same applies to
>> lib/djgpp.djl in CVS. I think I mentioned this before, but maybe I forgot.
> 
> 
> Is this also true for the users of gcc 3.4.6 and gcc 2.8.N?
> 
> Regards,
> Juan M. Guerrero

No, only gcc 10 creates these sections with the correct attributes.  It does so
by emitting a "b" flag on the .section directive, eg.:

     .globl   _foo
     .section .bss.foo,"wb"
_foo:
     .space 4

Then the assembler from binutils 2.35+ makes sure the CONTENTS / LOAD / DATA
attributes for that section are cleared.

For older gcc versions, this linker script workaround is actually incomplete:
the CONTENTS attribute will also be set on '.gnu.linkonce.b.*' sections.  So
you would have to link those sections in '.data' too, but that will then waste
more space for gcc 10 users.  I think it's best to just remove it.

If you want a universal solution that works for all gcc versions, then we need
to find some way of determining section attributes in binutils/bfd, based on
the section name.  I believe that is how these are handled in ELF.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019