please backport aarch64 -Bsymbolic-functions fix to trusty
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
binutils (Ubuntu) | ||||||
Trusty |
Fix Released
|
Undecided
|
Unassigned | |||
binutils-arm64-cross (Ubuntu) | ||||||
Trusty |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
There is a bug in the version ld.bfd in trusty on arm64, where even if
you pass -Bsymbolic-
subject to interposition by other shared objects. This was fixed and
backported to the binutils-2_24 branch in January 2015.
[Impact]
Shared libraries for Go depend on -Bsymbolic-
properly and while it's unlikely that we'll ever support a version of
Go on trusty that supports shared libraries, the arm64 builders for
Go's build dashboard are trusty machines and so I can't run the shared
library tests by default until this is fixed in trusty.
It's also extremely confusing to debug the problems this causes.
The bug existed on 32-bit ARM too, but there is a workaround: use gold
instead (which does not have this bug). That doesn't apply to arm64 as
there is no arm64 gold in trusty.
[Test Case]
$ cat shared.h
typedef int (*intfunc)(void);
int interpos(void);
intfunc getintfunc(void);
$ cat shared.c
#include <stdio.h>
#include "shared.h"
int interpos(void) {
return 0;
}
intfunc intfuncs[] = { interpos };
intfunc
getintfunc(void) {
return intfuncs[0];
}
void
callinterpos(void) {
}
$ cat main.c
#include <stdio.h>
#include "shared.h"
int interpos(void) {
return 1;
}
int main(int argc, char** argv) {
}
$ gcc -shared -Wl,-Bsymbolic-
$ gcc -o main main.c ./libshared.so
$ ./main
calling interpos directly says 0
calling interpos via pointer says 1
The two values printed should be the same.
[Regression Potential]
It is ever so slightly possible that some package depends on the
broken behaviour, but that seems pretty unlikely given that this
behaviour does not occur on intel platforms.
Related branches
description: | updated |
no longer affects: | binutils-arm64-cross (Ubuntu) |
no longer affects: | binutils (Ubuntu) |
Hello Michael, or anyone else affected,
Accepted binutils into trusty-proposed. The package will build now and be available at https:/ /launchpad. net/ubuntu/ +source/ binutils/ 2.24-5ubuntu14 in a few hours, and then in the -proposed repository.
Please help us by testing this new package. See https:/ /wiki.ubuntu. com/Testing/ EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification- failed. In either case, details of your testing will help us make a better decision.
Further information regarding the verification process can be found at https:/ /wiki.ubuntu. com/QATeam/ PerformingSRUVe rification . Thank you in advance!