Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/src/java.desktop/aix/native/libawt/porting_aix.h
41149 views
1
/*
2
* Copyright (c) 2012, 2018 SAP SE. All rights reserved.
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
*
5
* This code is free software; you can redistribute it and/or modify it
6
* under the terms of the GNU General Public License version 2 only, as
7
* published by the Free Software Foundation. Oracle designates this
8
* particular file as subject to the "Classpath" exception as provided
9
* by Oracle in the LICENSE file that accompanied this code.
10
*
11
* This code is distributed in the hope that it will be useful, but WITHOUT
12
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14
* version 2 for more details (a copy is included in the LICENSE file that
15
* accompanied this code).
16
*
17
* You should have received a copy of the GNU General Public License version
18
* 2 along with this work; if not, write to the Free Software Foundation,
19
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20
*
21
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22
* or visit www.oracle.com if you need additional information or have any
23
* questions.
24
*
25
*/
26
27
/*
28
* Header file to contain porting-relevant code which does not have a
29
* home anywhere else.
30
* This is intially based on hotspot/src/os/aix/vm/{loadlib,porting}_aix.{hpp,cpp}
31
*/
32
33
/*
34
* Aix' own version of dladdr().
35
* This function tries to mimick dladdr(3) on Linux
36
* (see http://linux.die.net/man/3/dladdr)
37
* dladdr(3) is not POSIX but a GNU extension, and is not available on AIX.
38
*
39
* Differences between AIX dladdr and Linux dladdr:
40
*
41
* 1) Dl_info.dli_fbase: can never work, is disabled.
42
* A loaded image on AIX is divided in multiple segments, at least two
43
* (text and data) but potentially also far more. This is because the loader may
44
* load each member into an own segment, as for instance happens with the libC.a
45
* 2) Dl_info.dli_sname: This only works for code symbols (functions); for data, a
46
* zero-length string is returned ("").
47
* 3) Dl_info.dli_saddr: For code, this will return the entry point of the function,
48
* not the function descriptor.
49
*/
50
51
typedef struct {
52
const char *dli_fname; /* file path of loaded library */
53
void *dli_fbase; /* doesn't make sence on AIX */
54
const char *dli_sname; /* symbol name; "" if not known */
55
void *dli_saddr; /* address of *entry* of function; not function descriptor; */
56
} Dl_info;
57
58
#ifdef __cplusplus
59
extern "C"
60
#endif
61
int dladdr(void *addr, Dl_info *info);
62
63