delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/02/28/15:04:30

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-3.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <49A998AC.8010000@cwilson.fastmail.fm>
Date: Sat, 28 Feb 2009 15:03:56 -0500
From: Charles Wilson <cygwin AT cwilson DOT fastmail DOT fm>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.19) Gecko/20081209 Thunderbird/2.0.0.19 Mnenhy/0.7.6.666
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: [1.7] rebaseall doesn't solve the problem
References: <499F6682 DOT 1090204 AT cwilson DOT fastmail DOT fm> <20090224100616 DOT GC6035 AT calimero DOT vinschen DOT de> <49A85971 DOT 6070300 AT cwilson DOT fastmail DOT fm> <20090228104337 DOT GG19887 AT calimero DOT vinschen DOT de> <49A986B4 DOT 2080501 AT cwilson DOT fastmail DOT fm> <20090228195127 DOT GA26646 AT ednor DOT casa DOT cgf DOT cx>
In-Reply-To: <20090228195127.GA26646@ednor.casa.cgf.cx>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Christopher Faylor wrote:
> It should be trivial to add this to binutils.  Doesn't it ultimately
> belong in ld and (maybe) objcopy?

Well, I'm sure it would be useful there.  However, just as ld can create
a DLL with a user-specified image base, yet we still have a separate
special purpose utility for rebasing them, it makes sense that ld can
create an exe or dll with a specific pe_dll_characteristics flag, but a
separate single-purpose utility to modify it is also useful.

I really don't want Q. Random User to try and run objcopy <confusing
options> on his entire installation...

> I can add this now but I don't think it should be the default just yet.

Agree.

BTW, this was mentioned on the binutils list about two years ago, but
nothing ever came of it:
http://sourceware.org/ml/binutils/2007-02/msg00046.html

> Do the exes themselves need this bit as well as the dlls?

From what I understand, ASLR makes sense for both DLLs and EXEs -- but
only if the image has relocations (most DLLs, and PIE exectuables).
TS-Aware makes sense only for EXEs according to Corinna.  NX could be
applied to any DLL or EXE (I think).

My mistake in the existing alsr code was to always skip if no
relocations -- so since we don't have PIE exes, you can't currently set
the TS or NX flags on ordinary exes with the tool.

--
Chuck


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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