[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #55363] Global variable in a MEX file
From: |
Guillaume |
Subject: |
[Octave-bug-tracker] [bug #55363] Global variable in a MEX file |
Date: |
Mon, 7 Jan 2019 06:25:38 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 |
Follow-up Comment #9, bug #55363 (project octave):
Adding '-Wl,-Bsymbolic-functions' manually to the Matlab mex compilation
command line does not change the behavior. Matlab seems to use the
'-Wl,--version-script=' flag, which probably takes precedence.
On Ubuntu, the '-Wl,-Bsymbolic-functions' link option comes from
$OCT_LINK_OPTS. If I redefine it to contain '-Wl,-z,relro' only before calling
mkoctfile, then everything works fine again. $OCT_LINK_OPTS seems to be
populated from $LDFLAGS.
I could find a number of related discussions, where that flag created similar
issues:
https://lists.ubuntu.com/archives/ubuntu-devel/2018-June/040369.html
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=637184
https://bugs.launchpad.net/ubuntu/+source/tango/+bug/1250534
https://github.com/grpc/grpc/issues/11195
Would there be a way to automatically strip '-Wl,-Bsymbolic-functions' from
$LDFLAGS if present? As mentioned in comments #4 and #5, it cannot be assumed
to be able to declare all functions and variables to be static in a MEX file.
For example, I could find this being described here:
http://anadoxin.org/blog/control-over-symbol-exports-in-gcc.html
with the solution to use '-Wl,--version-script='.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?55363>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #55363] Global variable in a MEX file, Guillaume, 2019/01/02
- [Octave-bug-tracker] [bug #55363] Global variable in a MEX file, Guillaume, 2019/01/02
- [Octave-bug-tracker] [bug #55363] Global variable in a MEX file, Rik, 2019/01/03
- [Octave-bug-tracker] [bug #55363] Global variable in a MEX file, Guillaume, 2019/01/03
- [Octave-bug-tracker] [bug #55363] Global variable in a MEX file, Mike Miller, 2019/01/03
- [Octave-bug-tracker] [bug #55363] Global variable in a MEX file, John W. Eaton, 2019/01/03
- [Octave-bug-tracker] [bug #55363] Global variable in a MEX file, Guillaume, 2019/01/04
- [Octave-bug-tracker] [bug #55363] Global variable in a MEX file, Rik, 2019/01/04
- [Octave-bug-tracker] [bug #55363] Global variable in a MEX file, Mike Miller, 2019/01/04
- [Octave-bug-tracker] [bug #55363] Global variable in a MEX file,
Guillaume <=
- [Octave-bug-tracker] [bug #55363] Global variable in a MEX file, Mike Miller, 2019/01/07
- [Octave-bug-tracker] [bug #55363] global variable in multiple mex or oct files collapse to one definition with -Bsymbolic-functions, Mike Miller, 2019/01/07
- [Octave-bug-tracker] [bug #55363] global variable in multiple mex or oct files collapse to one definition with -Bsymbolic-functions, Mike Miller, 2019/01/07
- [Octave-bug-tracker] [bug #55363] global variable in multiple mex or oct files collapse to one definition with -Bsymbolic-functions, Guillaume, 2019/01/08