From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 9E0AC1F55B for ; Mon, 18 May 2020 13:39:32 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CA556388F078; Mon, 18 May 2020 13:39:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CA556388F078 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1589809171; bh=rz3QNAitBulU9fZavXu08ZsJFFRyAYp+OFv/OhCxA5s=; h=To:Subject:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=l4NT9Z1exVTq45My49hqgoPnA8ZwhX8TSIxUZhJFysd26It3IKtLJMjj6DV2IiZIk oTSmdz7XFmyYpnR1kPN2Khw3W/NY454lR2moKtSaHRQcCixIe7PTgJPCQgKyRD/EGv 8UkYXVpgQcz2PMEGwVJZALpugsryQf719trdF2iE= Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by sourceware.org (Postfix) with ESMTP id 9F025388F071 for ; Mon, 18 May 2020 13:39:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9F025388F071 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-264-TtmXGpwlMdmqGh0ObY44vw-1; Mon, 18 May 2020 09:39:27 -0400 X-MC-Unique: TtmXGpwlMdmqGh0ObY44vw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 848E180B72B for ; Mon, 18 May 2020 13:39:26 +0000 (UTC) Received: from oldenburg2.str.redhat.com (ovpn-112-142.ams2.redhat.com [10.36.112.142]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3466760BF3; Mon, 18 May 2020 13:39:23 +0000 (UTC) To: Carlos O'Donell Subject: Re: [PATCH] elf: Assert that objects are relocated before their constructors run References: <87pnk7w3y3.fsf@oldenburg2.str.redhat.com> <4db7d14c-1132-a409-6f5d-a869334e3b98@redhat.com> Date: Mon, 18 May 2020 15:39:21 +0200 In-Reply-To: <4db7d14c-1132-a409-6f5d-a869334e3b98@redhat.com> (Carlos O'Donell's message of "Wed, 11 Sep 2019 08:35:09 -0400") Message-ID: <87pnb1bbw6.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Florian Weimer via Libc-alpha Reply-To: Florian Weimer Cc: libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" * Carlos O'Donell: > On 9/11/19 5:57 AM, Florian Weimer wrote: >> If we try to run constructors before relocation, this is always >> a dynamic linker bug. An assert is easier to notice than a call >> via an invalid function pointer (which may not even produce a valid >> call stack). >> >> 2019-09-11 Florian Weimer >> >> * elf/dl-init.c (call_init): Assert that the object has been >> relocated. > > OK for master. > > Reviewed-by: Carlos O'Donell Thanks. I've finally pushed this. Thanks, Florian