1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-10 06:10:52 +02:00

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.
This commit is contained in:
Henrik Gramner
2017-08-16 15:59:16 +02:00
parent 9e4b3675f2
commit 6b6edd1216

View File

@@ -4,9 +4,9 @@
;* Copyright (C) 2005-2017 x264 project ;* Copyright (C) 2005-2017 x264 project
;* ;*
;* Authors: Loren Merritt <lorenm@u.washington.edu> ;* Authors: Loren Merritt <lorenm@u.washington.edu>
;* Henrik Gramner <henrik@gramner.com>
;* Anton Mitrofanov <BugMaster@narod.ru> ;* Anton Mitrofanov <BugMaster@narod.ru>
;* Fiona Glaser <fiona@x264.com> ;* Fiona Glaser <fiona@x264.com>
;* Henrik Gramner <henrik@gramner.com>
;* ;*
;* Permission to use, copy, modify, and/or distribute this software for any ;* Permission to use, copy, modify, and/or distribute this software for any
;* purpose with or without fee is hereby granted, provided that the above ;* 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 %endif
%endmacro %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 %macro cextern 1
%xdefine %1 mangle(private_prefix %+ _ %+ %1) %xdefine %1 mangle(private_prefix %+ _ %+ %1)
CAT_XDEFINE cglobaled_, %1, 1 CAT_XDEFINE cglobaled_, %1, 1