From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from c.mail.sonic.net (c.mail.sonic.net [64.142.111.80]) by sourceware.org (Postfix) with ESMTPS id 796EF385DC06 for ; Wed, 15 Apr 2020 06:48:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 796EF385DC06 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=acm.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=casner@acm.org Received: from auge (75-25-121-24.lightspeed.snvaca.sbcglobal.net [75.25.121.24]) (authenticated bits=0) by c.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id 03F6m278030368 (version=TLSv1.2 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Tue, 14 Apr 2020 23:48:02 -0700 Date: Tue, 14 Apr 2020 23:48:01 -0700 (PDT) From: Stephen Casner To: binutils@sourceware.org Subject: Re: References to linker script symbols become undefined In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21.9999 (OSX 301 2018-08-15) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Sonic-CAuth: UmFuZG9tSVazA4kvo4YygB+4t1aRSDUqcSG8S/yot/cFUWPtLnTc5NHA/pZmgBdsVM0QmcP8djxbj5+QoO/cXdCC/eUBND/b X-Sonic-ID: C;lN0XDeV+6hGzURyowkndGQ== M;pHhODeV+6hGzURyowkndGQ== X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_SOFTFAIL, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Apr 2020 06:48:06 -0000 Nevermind. I have found the bug causing symbols in pdp11 output to be marked as undefined. I did find the BFD internals document, but that only helped a little. It might be a good idea to have a link to that document on the binutils web page. -- Steve On Sun, 12 Apr 2020, Stephen Casner wrote: > I'd appreciate some pointers from any ld/bfd experts reading this > list. I'm would like to fix the several unexpected failures that > occur when running ld testsuite for the pdp11-aout target. I have > learned that these unexpected failures have been unattended for a long > time. > > Some of the test failures can be fixed easily, but there are several > caused by a problem that appears to be a real bug for the pdp11-aout > target: when an assembler source file references a symbol defined in a > linker script, that symbol is marked as undefined in the output file. > This is true for both absolute symbols and symbols relocated to any of > the text, data or bss output sections. > > For example, the default linker script ld/ldscripts/pdp11.x defines > several symbols including _etext, _edata, _end. Those symbols are > listed in the symbol table with their correct values. However, if the > source file references any of them they become undefined while any > that are not referenced are still defined as before. > > I don't know my way around the ld/bfd source well enough to know where > the resolution of these symbols should be done, so I'd appreciate some > pointers. I'd be happy to RTFM if there is one (an internals doc like > the one for gcc?) or to UTSL if you can help narrow down the set of > files. Suggestions for debugging techniques (debug or trace options?) > would also be helpful. Thanks. > > -- Steve