From owner-freebsd-current@freebsd.org Fri Feb 26 02:23:03 2021 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D2F48552034 for ; Fri, 26 Feb 2021 02:23:03 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-il1-f177.google.com (mail-il1-f177.google.com [209.85.166.177]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dmtjg5dTQz4bDW; Fri, 26 Feb 2021 02:23:03 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-il1-f177.google.com with SMTP id q9so6814142ilo.1; Thu, 25 Feb 2021 18:23:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AICI3KhGZWEXoTJhN4UgFGbdet5P8EQwKy3yotZHV5w=; b=W9QTXl+rKEEdiCcuxDq5avFI0ilGOWuWUUPSGXa48VJu9PgDUdR6LiskMIgd/hhwOc E6PIcZiR9peQQp8CPdswzWH+VVDaHXtQY644fYuOvG5BKGX6iOZjVRI0NC9m7kSDTWlH MeIOaIfduSpsIf0WmGbJ4HyTj5kjywO1Vc2diTE7jsWMemfksM9HUbK8j378ZA26KzYg YmD+wdIxGElT9QMHArQvtKLcovL6hNu9XBcQX50ets8xebln6wZAuwc8PrWZJtU1KEob 5+LzCfDhUBeRGHLTgpvOXcpOWbUV1PnNke807u/guv1jeJmWhubKC+f5jXsAV9WN/jMa fAwA== X-Gm-Message-State: AOAM530FMGXt3t2Af4SACYt0Dh4e+BZV9bzQv5Wl80aUtyWI/444zIiH FYInXcuC2+I4qvfQNAyKGTvoOcw8def6YcyNFKk2a7QNi2A7+w== X-Google-Smtp-Source: ABdhPJy36lPzfoJ3KQFgqxqND3kQz/ndEBQyujZdesvn9luR5zKmbnRr4PgGo+Sl/ijPv2XJAHvmbrO4g02K2RihuvE= X-Received: by 2002:a05:6e02:1845:: with SMTP id b5mr604033ilv.11.1614306182735; Thu, 25 Feb 2021 18:23:02 -0800 (PST) MIME-Version: 1.0 References: <20210225231028.GB69550@eureka.lemis.com> In-Reply-To: From: Ed Maste Date: Thu, 25 Feb 2021 21:22:43 -0500 Message-ID: Subject: Re: HEADS-UP: PIE enabled by default on main To: John Kennedy Cc: "Greg 'groggy' Lehey" , FreeBSD Current Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4Dmtjg5dTQz4bDW X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Feb 2021 02:23:03 -0000 On Thu, 25 Feb 2021 at 19:23, John Kennedy wrote: > > Not sure if Ed Maste just wants to make sure that all the executables > are rebuilt as PIE (vs hit-and-miss) or there is a sneaker corner-case that > he knows about. The issue is that without a clean build you may have some .o files left around that are built without PIE enabled (i.e., compiled without -fPIE), and attempting to link them into a PIE executable will fail with an error like: ld: error: can't create dynamic relocation R_X86_64_32 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output I am not aware of any configuration that would link successfully, but then have some run-time failure. If it builds it should work.