From patchwork Mon Jul 11 09:18:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Martin_Storsj=C3=B6?= X-Patchwork-Id: 36734 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:6da0:b0:8b:e47:9dbf with SMTP id wl32csp1240440pzb; Mon, 11 Jul 2022 02:19:04 -0700 (PDT) X-Google-Smtp-Source: AGRyM1twCEul+FeHCip1N9TFEsdNwNQI6oU+kkOBkgW5z1W9ZGz0fj7yplA6rma/LI/auKmtLc5J X-Received: by 2002:a17:907:7ba6:b0:72b:44ff:7282 with SMTP id ne38-20020a1709077ba600b0072b44ff7282mr8519456ejc.652.1657531143973; Mon, 11 Jul 2022 02:19:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657531143; cv=none; d=google.com; s=arc-20160816; b=QkrZugeIDqwDROVvN0KNXhHS5Dh/aVm15CBYUQMkrjmw0dM2xPCJXM8nRmiHg5QxHb Ws5fmJIb/g0OpIwmLx8LCoIEPvfIwv1FvxBYRdS1q5fWu49syl1iLLFIG+QaxeluU8fr JpDOr8+hrfCdEPucNVd1LxCeWXlk1I2FBXrWgiBKmmuKopN3BA9N/gU52eeHd6t8tss+ eePzvUAC34DLiaRb0fiEJpPMR5M7MXSX6M2zLH5pLnSeMzI6bFvuphu9P5E2b88j4/6K RXyQf8MIUy09F1E8bzRZ+mGHxzCYRR+V9HLnEQdsHLIkL3DoRK/aGLO3lpQcq9siFdM8 HKsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=bgDdWxlGMQAtazFGt+D/tsekUEwHHwv7nMI/uQtnbZg=; b=ev9wl6w4K4mdnj4+h1O2fq6DKDiE0Ass6HirUGpjFOZEKaa3HSGsWe3pFlviKb/BsH 5j+hHtbSwXYPvgvPx6UnlXrvNBzLyyG20r117sQU+QeQWrkEhRtxggG0V+QSxix0jDE0 5JW9vKwxBuBPRJ2Ue1jQFzOMlp8oP8iDf/k3kAETSS4yYOA0ooo/qF9kvnAsBzWojmJi xFbnlZYrEY5eu7Ch+tgKgk7hYXjLC7wryL8NkQWUyPnDb81gRBhNKt9DuebY0KfZM86w aes530t62McX7nA2r0TyIh8aMKmt5XIaTYxs5VGCtiiZa+IqAvxIG8XvXADt3w2YmaFi Ba8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@martin-st.20210112.gappssmtp.com header.s=20210112 header.b=ljyC0dcI; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id my2-20020a1709065a4200b00726c7fc61cesi8385899ejc.723.2022.07.11.02.19.03; Mon, 11 Jul 2022 02:19:03 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@martin-st.20210112.gappssmtp.com header.s=20210112 header.b=ljyC0dcI; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 38B1468B74E; Mon, 11 Jul 2022 12:19:00 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D287568B70E for ; Mon, 11 Jul 2022 12:18:52 +0300 (EEST) Received: by mail-lf1-f44.google.com with SMTP id f39so7686448lfv.3 for ; Mon, 11 Jul 2022 02:18:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=FWAqleVUbfMfa0YeN7JfMEa/jLh4vTkVZvEoa+Js+os=; b=ljyC0dcIo93DXHo9Pet2WOYhnnIT7P0boJQcrl/ymW9PjzBP/LWLZkNMhDIorQZ6YU EVOfGc1WydUiuCZof2kYX1vK7v/nGehV/lfJSn5iHm6kmlvj2S5OYk8ZYoq1lqqbetPk rK8SBzFz2NJBVTeceVZ0Lb1ZFeQAFIiuOaEOSJx1nPEES4WM7aomiBVuGjQR81FeoCWU HXdQd/hmWYeGKRqNUx85jSlkqRPLTUBO6OIBmp4gtBJyOaO4TauPhdSqzvYFihmzHZ5F rbPEmJOpM6yx0wcnK+8H7wSZnh/mtDrwLR+H2XB44Wu1f3qTOYdjkrXmGsXfI+gRQkvs /EYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=FWAqleVUbfMfa0YeN7JfMEa/jLh4vTkVZvEoa+Js+os=; b=sCAsghaZqo3DIQHrgfZLq0Gv+c51DjKc0QbWg4lwWAQz/XckoHXR7IwC5dQd+Rmo/b qMl7QB4JS36GIO+f26URDsNGZsnicb2C4mdqqaStFt1c8SHBd5rFXKHAnBrsIo69u93c E4q/dbakUwkS3Xn5UArn/1KUKI0qLGEYuKDpmLcIimOlq+O9loPlCuvCxnGYElyFtgT3 ApNc1CpfcjCCjPgFzp3oEDjD1+r4JJbQqqnLnW9gggD8YfGTn4uyS8vooRAjjOcnEwhh FezEQgXJGrrmWp+uz+1sgvtaPUlGZk2wu/o8aDCp7KrFsAHLXHFaSwsg5Q+KJ3FmEWJl YmwQ== X-Gm-Message-State: AJIora8vb6nxVdv8g1QV18e0Xwbd/mrfdElj9pSslYJ5jlAvNlu5b6Dp zRoifumLUzYWEetDbVYixVuFTBxZ+q8kIIzk X-Received: by 2002:a05:6512:3096:b0:481:d6c:784a with SMTP id z22-20020a056512309600b004810d6c784amr10806440lfd.307.1657531131996; Mon, 11 Jul 2022 02:18:51 -0700 (PDT) Received: from localhost.localdomain (dsl-tkubng21-58c01c-243.dhcp.inet.fi. [88.192.28.243]) by smtp.gmail.com with ESMTPSA id p3-20020ac24ec3000000b0047255d210d6sm1441587lfr.5.2022.07.11.02.18.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jul 2022 02:18:51 -0700 (PDT) From: =?utf-8?q?Martin_Storsj=C3=B6?= To: ffmpeg-devel@ffmpeg.org Date: Mon, 11 Jul 2022 12:18:49 +0300 Message-Id: <20220711091850.4158449-1-martin@martin.st> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2] libavutil: Add av_visibility_hidden for setting hidden symbol visibility X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: =?utf-8?q?Martin_Storsj=C3=B6?= Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: elu8MMKxeTl2 Signed-off-by: Martin Storsjö --- doc/APIchanges | 3 +++ libavutil/attributes.h | 6 ++++++ libavutil/version.h | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIchanges index 20b944933a..5d84bc27d7 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -14,6 +14,9 @@ libavutil: 2021-04-27 API changes, most recent first: +2022-xx-xx - xxxxxxxxxx - lavu 57.28.100 - attributes.h + Add av_visibility_hidden, for setting hidden visibilty on symbols. + 2022-06-12 - xxxxxxxxxx - lavf 59.25.100 - avio.h Add avio_vprintf(), similar to avio_printf() but allow to use it from within a function taking a variable argument list as input. diff --git a/libavutil/attributes.h b/libavutil/attributes.h index 04c615c952..dc4c88932c 100644 --- a/libavutil/attributes.h +++ b/libavutil/attributes.h @@ -170,4 +170,10 @@ # define av_noreturn #endif +#if (AV_GCC_VERSION_AT_LEAST(4,0) || defined(__clang__)) && (defined(__ELF__) || defined(__MACH__)) +# define av_visibility_hidden __attribute__((visibility("hidden"))) +#else +# define av_visibility_hidden +#endif + #endif /* AVUTIL_ATTRIBUTES_H */ diff --git a/libavutil/version.h b/libavutil/version.h index 2e9e02dda8..87178e9e9a 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -79,7 +79,7 @@ */ #define LIBAVUTIL_VERSION_MAJOR 57 -#define LIBAVUTIL_VERSION_MINOR 27 +#define LIBAVUTIL_VERSION_MINOR 28 #define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ From patchwork Mon Jul 11 09:18:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Martin_Storsj=C3=B6?= X-Patchwork-Id: 36735 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:6da0:b0:8b:e47:9dbf with SMTP id wl32csp1240497pzb; Mon, 11 Jul 2022 02:19:12 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t+MDpDelB1aP1LHwgxNmmNnHfZiVlTSOhHx5MmL+2AlqlfycryhDjgQJDtwu42QnKR6ati X-Received: by 2002:a05:6402:2497:b0:437:a341:9286 with SMTP id q23-20020a056402249700b00437a3419286mr23442974eda.156.1657531152579; Mon, 11 Jul 2022 02:19:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657531152; cv=none; d=google.com; s=arc-20160816; b=mpaQnwOYqPI1F22M/OW+Ipdf9LcG4LAsQ22hbUd4x6ljCVQ7VWXcY+rtdQCzEv85Hb dwDX6jf6n4bFmpaSm0WhJr26QxhGVyt1SW0rcIOE7n0PB5G9bZ3LqNJI0UyPdQgnQvMV Bs5Nt+XA4rqhm6UaadS/c/xwUEixwQRRpsPG4Q2TpyHdZmVWW7/WL5P2htryMiRaKuGa kSGka/TrWNUmzpCoYe7ygA6SK1aBbW7QUu4uhFL4I3oKgFCFAkoP2oCK85hAtvowY/jP K95+2CeLIYRRF06N1iDH9LvCobDYEbVfS9Ab7Ru8HOyGfFV+Qbbg4nRMKFffjzk/a0uf jXIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=Wauy7N/IapgLTdxr5qy1lKYXGAb2lmkix3koVM+eY7Q=; b=0NKkNEWMnlsuE4uCsCwh1khE9yVT1sjJqTo5NUfzai/KqVlI0MNvWb2W9PECf6TsL4 6zYAbCliC5z2bGMCLeXu87gtCgjXjrutLsfsvs2WKngWxZtiqKvRKLLPi1k7auRe2NKE /K4wkcACY1BjgDVult2DpS9jGF0YI8tbyXRMLPxK0H4kVbcXmzydyA9p5awSiSRRNx0y SXLuVsAeQpiwgYWyWKlSOB3ZAIta/uDZ3Oads4RUHu281WOkO1YAeq6OSZi24SbdiKJQ Gic+lnagqUA8R+okp9R2hdirbW4jRvIRHOs0sCG7Wj3w88YOU+Q7K9D2a8Ybdls1HSWs clFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@martin-st.20210112.gappssmtp.com header.s=20210112 header.b=bHBzWzKN; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id m14-20020a056402430e00b0043ad5b0e08esi4032757edc.246.2022.07.11.02.19.12; Mon, 11 Jul 2022 02:19:12 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@martin-st.20210112.gappssmtp.com header.s=20210112 header.b=bHBzWzKN; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 13FE468B761; Mon, 11 Jul 2022 12:19:01 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3FACF68B70E for ; Mon, 11 Jul 2022 12:18:53 +0300 (EEST) Received: by mail-lj1-f175.google.com with SMTP id o12so2859875ljc.3 for ; Mon, 11 Jul 2022 02:18:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hyRfWl50+fEJJwSdeTYBGmsGUXk+jPxmeZMRryrCxYU=; b=bHBzWzKN1O96ncyckLFzH1NNiyDM9h14vAqiTqDqCWPM8OEZvgxr54KVu9VlVtrOfR ELx22NuEfVQ0PTnu45pgRJcYoFxT2eYUvxNcCIhTisD2tWN5b6Qg9Q+2iFXjxll/lCnh IhbinIjfYxpwaur0fkTe5MYgyKVBAcrkTnWRguKxRQLDTyLylV3bhfR/HcLOdLgYQPAQ 5nTpDaTepxIo9BdKhPWe2UKzkRhvSnc3Vy//cunDbsqiyVl8HC/kCoa7F2QF6MSePSm2 n+8GlkDBXo/QrHwMkpCnHGtkgWjX1tb5mNTO9WcYSfpLEgxcykOJYtI74GzZQ24ltprV qkGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hyRfWl50+fEJJwSdeTYBGmsGUXk+jPxmeZMRryrCxYU=; b=GNMX+c1rBMrxYJTmvJd6L2w2/gy8dozz0h98AtT3Z7GGtJwoHptsMeCwAdwi79sr1y 0CFMTElYkbrTfEwg5r7D31/BZg9YSoGtBtruZO2dSkTFBIkSIFwlVyfyB307YyZxKJGy HE1H7a0cZHtsIpVwaqmNVmC1nwJ+jmlWzTW+c8G4oARwVv0i9jIa4zU5TzE+bfT2OHP+ LjhxfNaxXiRrhuK6vg7H+JyffgYdwoquJ5YDtRWsy9vFYyN1VO5fbxmWvE8TfYsmjpA9 40Ij0+pAYrAR0vx7LcQwNdCCJikgYT73z/2Q3l/3BghrrjdOxkvCVXq4Pk3uKFQZreZq /nmA== X-Gm-Message-State: AJIora81lGmH1ehyHbRgP4QKwbbBEKBRfGmm/18eKwwOf0KgBfcUFE5B HuCI6QEz/MRqbJBFNzgD3U3DRy0KAxYk1ENC X-Received: by 2002:a2e:964c:0:b0:25d:6910:134b with SMTP id z12-20020a2e964c000000b0025d6910134bmr3357406ljh.299.1657531132534; Mon, 11 Jul 2022 02:18:52 -0700 (PDT) Received: from localhost.localdomain (dsl-tkubng21-58c01c-243.dhcp.inet.fi. [88.192.28.243]) by smtp.gmail.com with ESMTPSA id p3-20020ac24ec3000000b0047255d210d6sm1441587lfr.5.2022.07.11.02.18.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jul 2022 02:18:52 -0700 (PDT) From: =?utf-8?q?Martin_Storsj=C3=B6?= To: ffmpeg-devel@ffmpeg.org Date: Mon, 11 Jul 2022 12:18:50 +0300 Message-Id: <20220711091850.4158449-2-martin@martin.st> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220711091850.4158449-1-martin@martin.st> References: <20220711091850.4158449-1-martin@martin.st> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/2] libavcodec: Set hidden visibility on global symbols accessed from AArch64 assembly X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: =?utf-8?q?Martin_Storsj=C3=B6?= Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: t2Nbube3MPXa The AArch64 assembly accesses those symbols directly, without indirection via e.g. the GOT on ELF. In order for this not to require text relocations, those symbols need to be resolved fully at link time, i.e. those symbols can't be interposable. Normally, so far, this is achieved when linking shared libraries in two ways; we have a version script (libavcodec/libavcodec.v) which marks all symbols that don't start with av* as local. Additionally, we try to add -Wl,-Bsymbolic to the linker options if supported, making sure that such symbol references are resolved fully at link time, instead of making them interposable. When the libavcodec static library is linked into another shared library, there's no guarantee that it uses similar options (even though that would be favourable), which would end up requiring text relocations in the AArch64 assembly. Explicitly mark the symbols that are accessed from AArch64 assembly as hidden, so that they are resolved fully at link time even without the version script and -Wl,-Bsymbolic. Signed-off-by: Martin Storsjö --- libavcodec/aacsbrdata.h | 2 +- libavcodec/fft.h | 2 +- libavcodec/vp9dsp.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/aacsbrdata.h b/libavcodec/aacsbrdata.h index 7a11594c9b..aa382c4b52 100644 --- a/libavcodec/aacsbrdata.h +++ b/libavcodec/aacsbrdata.h @@ -268,7 +268,7 @@ static const int8_t sbr_offset[6][16] = { }; /* First eight entries repeated at end to simplify SIMD implementations. */ -const DECLARE_ALIGNED(16, INTFLOAT, AAC_RENAME(ff_sbr_noise_table))[][2] = { +const av_visibility_hidden DECLARE_ALIGNED(16, INTFLOAT, AAC_RENAME(ff_sbr_noise_table))[][2] = { {Q31(-0.99948153278296f), Q31(-0.59483417516607f)}, {Q31( 0.97113454393991f), Q31(-0.67528515225647f)}, {Q31( 0.14130051758487f), Q31(-0.95090983575689f)}, {Q31(-0.47005496701697f), Q31(-0.37340549728647f)}, {Q31( 0.80705063769351f), Q31( 0.29653668284408f)}, {Q31(-0.38981478896926f), Q31( 0.89572605717087f)}, diff --git a/libavcodec/fft.h b/libavcodec/fft.h index 706c9d07f5..c2241fbc7c 100644 --- a/libavcodec/fft.h +++ b/libavcodec/fft.h @@ -114,7 +114,7 @@ void ff_init_ff_cos_tabs(int index); #endif #define COSTABLE(size) \ - COSTABLE_CONST DECLARE_ALIGNED(32, FFTSample, FFT_NAME(ff_cos_##size))[size/2] + COSTABLE_CONST av_visibility_hidden DECLARE_ALIGNED(32, FFTSample, FFT_NAME(ff_cos_##size))[size/2] extern COSTABLE(16); extern COSTABLE(32); diff --git a/libavcodec/vp9dsp.c b/libavcodec/vp9dsp.c index d8ddf74d4f..1be942d78b 100644 --- a/libavcodec/vp9dsp.c +++ b/libavcodec/vp9dsp.c @@ -29,7 +29,7 @@ #include "vp9dsp.h" -const DECLARE_ALIGNED(16, int16_t, ff_vp9_subpel_filters)[3][16][8] = { +const av_visibility_hidden DECLARE_ALIGNED(16, int16_t, ff_vp9_subpel_filters)[3][16][8] = { [FILTER_8TAP_REGULAR] = { { 0, 0, 0, 128, 0, 0, 0, 0 }, { 0, 1, -5, 126, 8, -3, 1, 0 },