6 private links
This article’s aim is to explain how a modern operating system makes it possible to use shared libraries with load-time relocation. It focuses on the Linux OS running on 32-bit x86, but the general principles apply to other OSes and CPUs as well.
Each code module in your shared library should define the GOT as an external symbol:
extern _GLOBAL_OFFSETTABLE ; in ELF
extern __GLOBAL_OFFSETTABLE ; in BSD a.out
At the beginning of any function in your shared library which plans to access your data or BSS sections, you must first calculate the address of the GOT. This is typically done by writing the function in this form:
func: push ebp
mov ebp,esp
push ebx
call .get_GOT
.get_GOT:
pop ebx
add ebx,_GLOBAL_OFFSETTABLE+$$-.get_GOT wrt ..gotpc
; the function body comes here
mov ebx,[ebp-4]
mov esp,ebp
pop ebp
ret
How to use lib lua
ClanLib is a cross platform toolkit library with a primary focus on game creation. The library is Open Source and free for commercial use, under the ClanLib License.
Feature Highlights
Very liberal zlib style license
Supports Windows, Linux and partially Mac OS X
OpenGL, Direct3D and Software Rendering
High-performant shader based render architecture
Full GUI framework customizable using CSS 2.1
GUI windows rendered to textures or native windows
High level 2D graphics with fonts, sprites, animations, collisions
Network library with sockets, web and game interfaces
Game IDE graphic interface
Physics for both 2D and 3D
Scene Manager for 3D
OpenCL support
Database supporting SQLite
Sound supporting wav, tracker formats and ogg-vorbis
Basic cross platform runtime (threading, file I/O, XML/DOM, etc.)
Template based signal library (type-safe callbacks)
Integrated resource management
Fluxcapacitor allow to run program without them to sleep
Machine learning lib
Lots of cool stuff about graphic stuff