Commit e75d3348 by Nicolas Capens Committed by Nicolas Capens

Rename version scripts to linker scripts.

Blaze (Bazel) requires linker dependencies to have a .ld, .lds, or .ldscript extension. Note that version scripts are just the contents of the VERSION command in (true) linker scripts. However, the gold linker used by Android does not support implicit linker scripts (which amend the default linker script), nor the INSERT command. Therefore these linker scripts are still actually just version scripts. https://sourceware.org/binutils/docs/ld/VERSION.html Bug b/67482470 Change-Id: I3bbe25dab6d916376bdc41bb723279ed2ef62fb0 Reviewed-on: https://swiftshader-review.googlesource.com/13108Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 5ba372fa
...@@ -110,7 +110,8 @@ macro(set_target_export_map TARGET DIR) ...@@ -110,7 +110,8 @@ macro(set_target_export_map TARGET DIR)
# hides all the others. Gc sections is used in combination # hides all the others. Gc sections is used in combination
# with each functions being in its section, to reduce the # with each functions being in its section, to reduce the
# binary size. # binary size.
set_target_properties(${TARGET} PROPERTIES LINK_FLAGS "${LINKFLAGS} -Wl,--hash-style=both,--version-script=${DIR}/exports.map,--gc-sections,--no-undefined") set_target_properties(${TARGET} PROPERTIES LINK_FLAGS "${LINKFLAGS} -Wl,--hash-style=both,--version-script=${DIR}/${TARGET}.lds,--gc-sections,--no-undefined")
set_target_properties(${TARGET} PROPERTIES LINK_DEPENDS "${DIR}/${TARGET}.lds")
endif() endif()
endmacro() endmacro()
......
...@@ -55,7 +55,7 @@ The OpenGL (ES) and EGL APIs are implemented in [src/OpenGL/](../src/OpenGL/). ...@@ -55,7 +55,7 @@ The OpenGL (ES) and EGL APIs are implemented in [src/OpenGL/](../src/OpenGL/).
The GLSL compiler is implemented in [src/OpenGL/compiler/](../src/OpenGL/compiler/). It uses [Flex](http://flex.sourceforge.net/) and [Bison](https://www.gnu.org/software/bison/) to tokenize and parse GLSL shader source. It produces an [abstract syntax tree](https://en.wikipedia.org/wiki/Abstract_syntax_tree) (AST), which is then traversed to output assembly-level instructions in [OutputASM.cpp](../src/OpenGL/compiler/OutputASM.cpp). The GLSL compiler is implemented in [src/OpenGL/compiler/](../src/OpenGL/compiler/). It uses [Flex](http://flex.sourceforge.net/) and [Bison](https://www.gnu.org/software/bison/) to tokenize and parse GLSL shader source. It produces an [abstract syntax tree](https://en.wikipedia.org/wiki/Abstract_syntax_tree) (AST), which is then traversed to output assembly-level instructions in [OutputASM.cpp](../src/OpenGL/compiler/OutputASM.cpp).
The [EGL](https://www.khronos.org/registry/egl/specs/eglspec.1.4.20110406.pdf) API is implemented in [src/OpenGL/libEGL/](../src/OpenGL/libEGL/). Its entry functions are listed in [libEGL.def](../src/OpenGL/libEGL/libEGL.def) (for Windows) and [exports.map](../src/OpenGL/libEGL/exports.map) (for Linux), and defined in [main.cpp](../src/OpenGL/libEGL/main.cpp) and implemented in [libEGL.cpp](../src/OpenGL/libEGL/libEGL.cpp). The [Display](../src/OpenGL/libEGL/Display.h), [Surface](../src/OpenGL/libEGL/Surface.h), and [Config](../src/OpenGL/libEGL/Config.h) classes are respective implementations of the abstract EGLDisplay, EGLSurface, and EGLConfig types. The [EGL](https://www.khronos.org/registry/egl/specs/eglspec.1.4.20110406.pdf) API is implemented in [src/OpenGL/libEGL/](../src/OpenGL/libEGL/). Its entry functions are listed in [libEGL.def](../src/OpenGL/libEGL/libEGL.def) (for Windows) and [libEGL.lds](../src/OpenGL/libEGL/libEGL.lds) (for Linux), and defined in [main.cpp](../src/OpenGL/libEGL/main.cpp) and implemented in [libEGL.cpp](../src/OpenGL/libEGL/libEGL.cpp). The [Display](../src/OpenGL/libEGL/Display.h), [Surface](../src/OpenGL/libEGL/Surface.h), and [Config](../src/OpenGL/libEGL/Config.h) classes are respective implementations of the abstract EGLDisplay, EGLSurface, and EGLConfig types.
[OpenGL ES 1.1](https://www.khronos.org/registry/gles/specs/1.1/es_full_spec_1.1.12.pdf) is implemented in [src/OpenGL/libGLES_CM/](../src/OpenGL/libGLES_CM/), while [OpenGL ES 2.0](https://www.khronos.org/registry/gles/specs/2.0/es_full_spec_2.0.25.pdf) is implemented in [src/OpenGL/libGLESv2/](../src/OpenGL/libGLESv2/). Note that while [OpenGL ES 3.0](https://www.khronos.org/registry/gles/specs/3.0/es_spec_3.0.0.pdf) functions are implemented in [libGLESv3.cpp](../src/OpenGL/libGLESv2/libGLESv3.cpp), it is compiled into the libGLESv2 library as standard among most implementations (some platforms have a libGLESv3 symbolically link to libGLESv2). We'll focus on OpenGL ES 2.0 in this documentation. [OpenGL ES 1.1](https://www.khronos.org/registry/gles/specs/1.1/es_full_spec_1.1.12.pdf) is implemented in [src/OpenGL/libGLES_CM/](../src/OpenGL/libGLES_CM/), while [OpenGL ES 2.0](https://www.khronos.org/registry/gles/specs/2.0/es_full_spec_2.0.25.pdf) is implemented in [src/OpenGL/libGLESv2/](../src/OpenGL/libGLESv2/). Note that while [OpenGL ES 3.0](https://www.khronos.org/registry/gles/specs/3.0/es_spec_3.0.0.pdf) functions are implemented in [libGLESv3.cpp](../src/OpenGL/libGLESv2/libGLESv3.cpp), it is compiled into the libGLESv2 library as standard among most implementations (some platforms have a libGLESv3 symbolically link to libGLESv2). We'll focus on OpenGL ES 2.0 in this documentation.
......
...@@ -59,7 +59,8 @@ COMMON_C_INCLUDES += external/stlport/stlport ...@@ -59,7 +59,8 @@ COMMON_C_INCLUDES += external/stlport/stlport
endif endif
COMMON_LDFLAGS := \ COMMON_LDFLAGS := \
-Wl,--version-script=$(LOCAL_PATH)/exports.map \ -Wl,--version-script=$(LOCAL_PATH)/libEGL.lds \
-Wl,--gc-sections \
-Wl,--hash-style=sysv -Wl,--hash-style=sysv
include $(CLEAR_VARS) include $(CLEAR_VARS)
......
...@@ -74,7 +74,7 @@ swiftshader_shared_library("swiftshader_libEGL") { ...@@ -74,7 +74,7 @@ swiftshader_shared_library("swiftshader_libEGL") {
} else if (is_linux) { } else if (is_linux) {
sources += [ "../../Main/libX11.cpp" ] sources += [ "../../Main/libX11.cpp" ]
ldflags = ldflags =
[ "-Wl,--version-script=" + rebase_path("exports.map", root_build_dir) ] [ "-Wl,--version-script=" + rebase_path("libEGL.lds", root_build_dir) ]
} }
configs = [ ":swiftshader_libEGL_private_config" ] configs = [ ":swiftshader_libEGL_private_config" ]
......
...@@ -81,8 +81,8 @@ COMMON_C_INCLUDES += external/stlport/stlport ...@@ -81,8 +81,8 @@ COMMON_C_INCLUDES += external/stlport/stlport
endif endif
COMMON_LDFLAGS := \ COMMON_LDFLAGS := \
-Wl,--version-script=$(LOCAL_PATH)/libGLES_CM.lds \
-Wl,--gc-sections \ -Wl,--gc-sections \
-Wl,--version-script=$(LOCAL_PATH)/exports.map \
-Wl,--hash-style=sysv -Wl,--hash-style=sysv
include $(CLEAR_VARS) include $(CLEAR_VARS)
......
...@@ -88,8 +88,8 @@ COMMON_C_INCLUDES += external/stlport/stlport ...@@ -88,8 +88,8 @@ COMMON_C_INCLUDES += external/stlport/stlport
endif endif
COMMON_LDFLAGS := \ COMMON_LDFLAGS := \
-Wl,--version-script=$(LOCAL_PATH)/libGLESv2.lds \
-Wl,--gc-sections \ -Wl,--gc-sections \
-Wl,--version-script=$(LOCAL_PATH)/exports.map \
-Wl,--hash-style=sysv -Wl,--hash-style=sysv
include $(CLEAR_VARS) include $(CLEAR_VARS)
......
...@@ -94,7 +94,7 @@ swiftshader_shared_library("swiftshader_libGLESv2") { ...@@ -94,7 +94,7 @@ swiftshader_shared_library("swiftshader_libGLESv2") {
ldflags = [ "-Wl,-install_name,@rpath/libswiftshader_libGLESv2.dylib" ] ldflags = [ "-Wl,-install_name,@rpath/libswiftshader_libGLESv2.dylib" ]
} else if (is_linux) { } else if (is_linux) {
ldflags = ldflags =
[ "-Wl,--version-script=" + rebase_path("exports.map", root_build_dir) ] [ "-Wl,--version-script=" + rebase_path("libGLESv2.lds", root_build_dir) ]
} }
configs = [ ":swiftshader_libGLESv2_private_config" ] configs = [ ":swiftshader_libGLESv2_private_config" ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment