From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web10.9764.1684937173167066504 for ; Wed, 24 May 2023 07:06:13 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=D2VURgh/; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684937172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Bo2KMZW7t9soszZYN/9bqTlkLIj4AgXpJXoxhENVENI=; b=D2VURgh/ZLrLPNuf5Mkq0vENnYDn85CIEQ1mJHeW83RpfL0f6bvcpuExEK1aYCt5RBgfjz Gp6ErgU7ywYSEP8nplu4SrhAGa7e3XNkjyfSnZViv/Hk+2EFrGIhg4KqCR4BOxywxURIxV Kf4IBQRo1XUnuSAxkxOUqBZbnIq2coM= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-114-uUBERzs_M2CScSLEB8Wy9w-1; Wed, 24 May 2023 10:06:08 -0400 X-MC-Unique: uUBERzs_M2CScSLEB8Wy9w-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 73D4B1C0ED0A; Wed, 24 May 2023 14:06:04 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.48]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3DF6F400F1F; Wed, 24 May 2023 14:06:04 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id A420718012CF; Wed, 24 May 2023 16:06:00 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Daniel Schaefer , =?UTF-8?q?Marvin=20H=C3=A4user?= , Rebecca Cran , Oliver Steffen , Liming Gao , Pawel Polawski , Chao Li , Ard Biesheuvel , Bob Feng , Sunil V L , Michael D Kinney , Leif Lindholm , Dongyan Qian , Yuwei Chen , Baoqi Zhang , Zhiguang Liu , Gerd Hoffmann Subject: [PATCH v6 03/11] MdePkg: don't set visibility to hidden Date: Wed, 24 May 2023 16:05:52 +0200 Message-Id: <20230524140600.1432056-4-kraxel@redhat.com> In-Reply-To: <20230524140600.1432056-1-kraxel@redhat.com> References: <20230524140600.1432056-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true Not needed any more on modern toolchains, they are better in not creating a GOT without this trick. Signed-off-by: Gerd Hoffmann Reviewed-by: Liming Gao Reviewed-by: Rebecca Cran --- MdePkg/Include/X64/ProcessorBind.h | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/MdePkg/Include/X64/ProcessorBind.h b/MdePkg/Include/X64/ProcessorBind.h index cdbb4fd6d3d1..bc152ea761f9 100644 --- a/MdePkg/Include/X64/ProcessorBind.h +++ b/MdePkg/Include/X64/ProcessorBind.h @@ -21,20 +21,6 @@ #pragma pack() #endif -#if defined (__GNUC__) && defined (__pic__) && !defined (USING_LTO) && !defined (__APPLE__) -// -// Mark all symbol declarations and references as hidden, meaning they will -// not be subject to symbol preemption. This allows the compiler to refer to -// symbols directly using relative references rather than via the GOT, which -// contains absolute symbol addresses that are subject to runtime relocation. -// -// The LTO linker will not emit GOT based relocations when all symbol -// references can be resolved locally, and so there is no need to set the -// pragma in that case (and doing so will cause other issues). -// - #pragma GCC visibility push (hidden) -#endif - #if defined (__INTEL_COMPILER) // // Disable ICC's remark #869: "Parameter" was never referenced warning. -- 2.40.1