From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mimir.eigenstate.org ([206.124.132.107]) by ur; Sat Mar 18 04:48:49 EDT 2017 Received: from oneeye (unknown [98.207.157.125]) by mimir.eigenstate.org (Postfix) with ESMTPSA id AA02A600F7 for <9front@9front.org>; Sat, 18 Mar 2017 04:48:45 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eigenstate.org; s=mail; t=1489826925; bh=do29p3U5GuVrC5BJWVUMBfFryc8SUd1UGqsH9Tn0YIs=; h=Date:From:To:Subject; b=CQeZwMTUwIPv/WtSsiOq7efjhv4UY4ycOvKBQxR+dgnXvcIRTbCtiWC4ba6K8y6Ng V3R7n4Ccj/ZuT33ERs2g5SKrZPKMXR2eYiftk2Uiquvr9i3ydpSzZWbaXuAGxTPqtl qMkZ/HvfmBv8O6wRVZyvTWWtDh19ZyKODJQyodoM= Date: Sat, 18 Mar 2017 01:48:43 -0700 From: Ori Bernstein To: 9front@9front.org Subject: Patch: Respect DUPOK flag on GLOBL (for 6l). Message-Id: <20170318014843.dcf3a42f4bb592d7b0c4d37d@eigenstate.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.29; amd64-portbld-freebsd11.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: stable polling ORM database-based method API configuration database The plan 9 assemblers support the DUPOK flag on text symbols. They parse and ignore it on GLOBL symbols. This patch makes it work for 6l. The reason I ran into this is because my programming language (Myrddin) uses data symbols to generate type information, and it's useful to avoid duplicating all of the type info in every file that gets generated. Currently I only implemented it for 6l, but I'm willing to send in patches for all other linker versions; I just have no way of testing anything other than 386 right now. The patch is simple, adding only 4 lines of code: http://okturing.com/src/1168/body