From 12feaa7d3b1544098f684d851e3caff1ec88cbc8 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 30 Jan 2015 21:09:17 +0100 Subject: Refine Native Library Code: Bulk Permissions, Cleanup DynamicLinker impl. - and fix Android AArch64 BionicDynamicLinker (Bug 1122) - Bulk Permissions ProcAddressTable.reset(..) performs address lookup in one block. Now claiming all permissions upfront once, and releasing them afterwards. - Cleanup DynamicLinker impl. Proper top-down impl. of DynamicLinkerImpl, handling all security code and validations. - Fix Android AArch64 BionicDynamicLinker (Bug 1122) Dalvik uses diff RTLD_* defines for AArch64! --- src/java/com/jogamp/common/os/DynamicLookupHelper.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/java/com/jogamp/common/os/DynamicLookupHelper.java') diff --git a/src/java/com/jogamp/common/os/DynamicLookupHelper.java b/src/java/com/jogamp/common/os/DynamicLookupHelper.java index 0f87351..7997d57 100644 --- a/src/java/com/jogamp/common/os/DynamicLookupHelper.java +++ b/src/java/com/jogamp/common/os/DynamicLookupHelper.java @@ -50,13 +50,24 @@ public interface DynamicLookupHelper { public static final boolean DEBUG = Debug.debug("NativeLibrary"); public static final boolean DEBUG_LOOKUP = Debug.debug("NativeLibrary.Lookup"); + /** + * @throws SecurityException if user is not granted access for the library set. + */ + public void claimAllLinkPermission() throws SecurityException; + /** + * @throws SecurityException if user is not granted access for the library set. + */ + public void releaseAllLinkPermission() throws SecurityException; + /** * Returns the function handle for function 'funcName'. + * @throws SecurityException if user is not granted access for the library set. */ - public long dynamicLookupFunction(String funcName); + public long dynamicLookupFunction(String funcName) throws SecurityException; /** * Queries whether function 'funcName' is available. + * @throws SecurityException if user is not granted access for the library set. */ - public boolean isFunctionAvailable(String funcName); + public boolean isFunctionAvailable(String funcName) throws SecurityException; } -- cgit v1.2.3