[Mesa-dev] [PATCH 07/16] targets/omx: use version script to limit amount of exported symbols

Christian König christian.koenig at amd.com
Sat Apr 5 04:01:03 PDT 2014


Am 05.04.2014 12:13, schrieb Emil Velikov:
> On 05/04/14 11:02, Christian König wrote:
>> Am 05.04.2014 12:01, schrieb Emil Velikov:
>>> On 05/04/14 10:34, Christian König wrote:
>>>> Am 05.04.2014 03:46, schrieb Emil Velikov:
>>>>> Using export-symbols-regex is the least desirable method of restricting
>>>>> the exported symbols, as is completely messes up with the symbol table.
>>>>>
>>>>> radeon_drm_winsys_create is not needed, avoid exporting it.
>>>> Please add that anyway, we are going to need OMX GL interop pretty soon.
>>>>
>>> IMHO the "add an exported symbol when needed" approach sounds slightly better,
>>> but I can add it back if you really like it.
>> Fair enough.
>>
> To clarify, should I add radeon_drm_winsys_create or the patch is ok as is ?

The patch is ok as it is.

>
>>> Related: Is there any particular reason what the library is versioned but the
>>> number is omitted/kept 0:) (i.e. libomx_r600.so.0.0.0) ?
>> Yeah, the reason is I'm lazy and coded this under time pressure.
>>
> Would be great to have it in a stable state before distros start
> building/shipping this by default.
>
> I can send a patch, but I'm not sure how you feel - drop the versioning, or
> promote to 1:0 ?  FWIW my "vote" goes for the former.

Feel free to just remove it.

Christian.

>
> -Emil
>> Christian.
>>
>>> -Emil
>>>> Christian.
>>>>
>>>>> Cc: Christian König <christian.koenig at amd.com>
>>>>> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
>>>>> ---
>>>>>     src/gallium/Automake.inc                     | 2 +-
>>>>>     src/gallium/targets/omx.sym                  | 6 ++++++
>>>>>     src/gallium/targets/r600/omx/Makefile.am     | 2 --
>>>>>     src/gallium/targets/radeonsi/omx/Makefile.am | 2 --
>>>>>     4 files changed, 7 insertions(+), 5 deletions(-)
>>>>>     create mode 100644 src/gallium/targets/omx.sym
>>>>>
>>>>> diff --git a/src/gallium/Automake.inc b/src/gallium/Automake.inc
>>>>> index a70ab6c..2fbea6e 100644
>>>>> --- a/src/gallium/Automake.inc
>>>>> +++ b/src/gallium/Automake.inc
>>>>> @@ -80,7 +80,7 @@ GALLIUM_OMX_LINKER_FLAGS = \
>>>>>         -shared \
>>>>>         -module \
>>>>>         -no-undefined \
>>>>> -    -export-symbols-regex $(EXPORTS) \
>>>>> +    -Wl,--version-script=$(top_srcdir)/src/gallium/targets/omx.sym \
>>>>>         $(GC_SECTIONS) \
>>>>>         -Wl,--no-undefined
>>>>>     diff --git a/src/gallium/targets/omx.sym b/src/gallium/targets/omx.sym
>>>>> new file mode 100644
>>>>> index 0000000..af22aed
>>>>> --- /dev/null
>>>>> +++ b/src/gallium/targets/omx.sym
>>>>> @@ -0,0 +1,6 @@
>>>>> +{
>>>>> +    global:
>>>>> +        omx_component_library_Setup;
>>>>> +    local:
>>>>> +        *;
>>>>> +};
>>>>> diff --git a/src/gallium/targets/r600/omx/Makefile.am
>>>>> b/src/gallium/targets/r600/omx/Makefile.am
>>>>> index 2168db8..62e3970 100644
>>>>> --- a/src/gallium/targets/r600/omx/Makefile.am
>>>>> +++ b/src/gallium/targets/r600/omx/Makefile.am
>>>>> @@ -20,8 +20,6 @@
>>>>>     # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
>>>>>     # DEALINGS IN THE SOFTWARE.
>>>>>     -EXPORTS = '^(omx_component_library_Setup|radeon_drm_winsys_create)$$'
>>>>> -
>>>>>     include $(top_srcdir)/src/gallium/Automake.inc
>>>>>       AM_CFLAGS = \
>>>>> diff --git a/src/gallium/targets/radeonsi/omx/Makefile.am
>>>>> b/src/gallium/targets/radeonsi/omx/Makefile.am
>>>>> index 3c37909..859659e 100644
>>>>> --- a/src/gallium/targets/radeonsi/omx/Makefile.am
>>>>> +++ b/src/gallium/targets/radeonsi/omx/Makefile.am
>>>>> @@ -20,8 +20,6 @@
>>>>>     # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
>>>>>     # DEALINGS IN THE SOFTWARE.
>>>>>     -EXPORTS = '^(omx_component_library_Setup|radeon_drm_winsys_create)$$'
>>>>> -
>>>>>     include $(top_srcdir)/src/gallium/Automake.inc
>>>>>       AM_CFLAGS = \



More information about the mesa-dev mailing list