Skip to content

Commit

Permalink
Merge pull request libhybris#335 from Tofee/master
Browse files Browse the repository at this point in the history
linker: introduce HYBRIS_LINKER_FORCE_BASENAME for .so search
  • Loading branch information
morphis committed Feb 6, 2017
2 parents 2c235fc + 45acbd4 commit a37a36b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions hybris/common/jb/linker.c
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,13 @@ static int open_library(const char *name)
if(name == 0) return -1;
if(strlen(name) > 256) return -1;

if ((name[0] == '/') && (getenv("HYBRIS_LINKER_FORCE_BASENAME") != NULL))
{
const char *bname = strrchr(name, '/');
if ((bname != NULL) && ((fd = open_library(bname+1)) >= 0))
return fd;
}

if ((name[0] == '/') && ((fd = _open_lib(name)) >= 0))
return fd;

Expand Down

0 comments on commit a37a36b

Please sign in to comment.