[FFmpeg-cvslog] x86inc: Support creating global symbols from local labels

Henrik Gramner git at videolan.org
Sat Jan 20 20:30:19 EET 2018


ffmpeg | branch: master | Henrik Gramner <henrik at gramner.com> | Wed Aug 16 15:59:16 2017 +0200| [6b6edd121699a87c17bd5eca9e94cdd125088c0e] | committer: Henrik Gramner

x86inc: Support creating global symbols from local labels

On ELF platforms such symbols needs to be flagged as functions with the
correct visibility to please certain linkers in some scenarios.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6b6edd121699a87c17bd5eca9e94cdd125088c0e
---

 libavutil/x86/x86inc.asm | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/libavutil/x86/x86inc.asm b/libavutil/x86/x86inc.asm
index 57cd4d80de..de048f863d 100644
--- a/libavutil/x86/x86inc.asm
+++ b/libavutil/x86/x86inc.asm
@@ -4,9 +4,9 @@
 ;* Copyright (C) 2005-2017 x264 project
 ;*
 ;* Authors: Loren Merritt <lorenm at u.washington.edu>
+;*          Henrik Gramner <henrik at gramner.com>
 ;*          Anton Mitrofanov <BugMaster at narod.ru>
 ;*          Fiona Glaser <fiona at x264.com>
-;*          Henrik Gramner <henrik at gramner.com>
 ;*
 ;* Permission to use, copy, modify, and/or distribute this software for any
 ;* purpose with or without fee is hereby granted, provided that the above
@@ -743,6 +743,16 @@ BRANCH_INSTR jz, je, jnz, jne, jl, jle, jnl, jnle, jg, jge, jng, jnge, ja, jae,
     %endif
 %endmacro
 
+; Create a global symbol from a local label with the correct name mangling and type
+%macro cglobal_label 1
+    %if FORMAT_ELF
+        global current_function %+ %1:function hidden
+    %else
+        global current_function %+ %1
+    %endif
+    %1:
+%endmacro
+
 %macro cextern 1
     %xdefine %1 mangle(private_prefix %+ _ %+ %1)
     CAT_XDEFINE cglobaled_, %1, 1



More information about the ffmpeg-cvslog mailing list