[Pixman] mips* asm exports symbols that should not export

Siarhei Siamashka siarhei.siamashka at gmail.com
Thu Dec 19 19:14:53 PST 2013


On Thu, 19 Dec 2013 19:08:26 +0200
Siarhei Siamashka <siarhei.siamashka at gmail.com> wrote:

> On Thu, 19 Dec 2013 17:21:16 +0100
> "Nemanja Lukic" <nemanja.lukic at rt-rk.com> wrote:
> 
> > Hi YunQiang Su,
> > 
> > Attached is solution for unwanted symbol visibility.
> > I'll upstream both patches soon.
> 
> > diff --git a/pixman/pixman-mips-dspr2-asm.h b/pixman/pixman-mips-dspr2-asm.h
> > index cab122d..718737e 100644
> > --- a/pixman/pixman-mips-dspr2-asm.h
> > +++ b/pixman/pixman-mips-dspr2-asm.h
> > @@ -71,6 +71,7 @@
> >   */
> >  #define LEAF_MIPS32R2(symbol)                           \
> >                  .globl  symbol;                         \
> > +                .hidden symbol;                         \
> >                  .align  2;                              \
> >                  .type   symbol, @function;              \
> >                  .ent    symbol, 0;                      \
> 
> From "info as":
> 
> 7.59 `.hidden NAMES'
> ====================
> 
> This is one of the ELF visibility directives.  The other two are
> `.internal' (*note `.internal': Internal.) and `.protected' (*note
> `.protected': Protected.).
> 
>    This directive overrides the named symbols default visibility (which
> is set by their binding: local, global or weak).  The directive sets
> the visibility to `hidden' which means that the symbols are not visible
> to other components.  Such symbols are always considered to be
> `protected' as well.
> 
> 
> This is an ELF-specific directive. ARM assembly code encloses this
> directive in "#ifdef __ELF__" to be on a safe side. Are there any
> possible MIPS targets using non-ELF object file format?

In any case, the addition of the .hidden attribute looks like a good
fix to me (with or without the additional __ELF__ guard check).
I guess the non-ELF MIPS systems might be all extinct by now:
    http://en.wikipedia.org/wiki/ECOFF
    https://www.sourceware.org/ml/crossgcc/2000-11/msg00038.html :)

Thanks for the patch.

-- 
Best regards,
Siarhei Siamashka


More information about the Pixman mailing list