Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linking issue on electron 1.5+ on Linux #10

Closed
Kagami opened this issue Mar 11, 2017 · 3 comments
Closed

Linking issue on electron 1.5+ on Linux #10

Kagami opened this issue Mar 11, 2017 · 3 comments

Comments

@Kagami
Copy link
Owner Author

Kagami commented Mar 11, 2017

Made it!

nm -D electron | awk '/ \w (av|ff)/{print $3}' | xargs rebind -w -i electron

With that patch to rebind:

diff --git a/rebind/rebind.c b/rebind/rebind.c
index 16252ad..dd16cae 100644
--- a/rebind/rebind.c
+++ b/rebind/rebind.c
@@ -151,7 +151,8 @@ static int changesymbols(Elf64_Sym *symtab, char const *strtab, int count)
 	name = strtab + sym->st_name;
 	if (!bsearch(&name, namelist, namecount, sizeof *namelist, qstrcmp))
 	    continue;
-	if (chgbind) {
+	sym->st_info = 0;
+	if (0) {
 	    if (ELF64_ST_BIND(sym->st_info) == STB_LOCAL) {
 		fprintf(stderr, "warning: cannot rebind local symbol \"%s\"\n",
 				name);
@@ -159,7 +160,7 @@ static int changesymbols(Elf64_Sym *symtab, char const *strtab, int count)
 	    }
 	    sym->st_info = ELF64_ST_INFO(tobind, ELF64_ST_TYPE(sym->st_info));
 	}
-	if (chgvisibility)
+	if (0)
 	    sym->st_other = ELF64_ST_VISIBILITY(tovisibility);
 	if (verbose)
 	    printf("%s: \"%s\" altered.\n", thefilename, name);

So crazy but works.

Kagami added a commit to Kagami/ELFkickers that referenced this issue Mar 11, 2017
Dirty patch just for Kagami/mpv.js#10
@Kagami Kagami closed this as completed Mar 13, 2017
@williamoliveira
Copy link

Is this workaround still necessary?

@Kagami
Copy link
Owner Author

Kagami commented May 2, 2017

It's fixed in latest versions of Electron (restored explicit dependency on libffmpeg).
I like the previous behavior a bit more though, because you don't have to depend on shared ffmpeg libraries with specific version (major number) on target user system.

(Actually it's possible to remove libffmpeg dependency even in latest versions, but it's even more crazy, you need to patch binary for that.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants