8.167 --shared

Enables a shared library to be generated when building for ARM Linux with the --arm_linux_paths option.

It enables the selection of libraries and initialization code suitable for use in a shared library, based on the ARM Linux configuration.


You must use this option in conjunction with --arm_linux_paths and --apcs=/fpic.


Link two object files, obj1.o and obj2.o, into a shared library named libexample.o:

armcc --arm_linux_paths --arm_linux_config_file=my_config_file --shared -o libexample.so obj1.o obj2.o

Related reference
8.9 --arm_linux_config_file=path
8.10 --arm_linux_configure
8.11 --arm_linux_paths
8.29 --configure_cpp_headers=path
8.179 --translate_gcc
8.180 --translate_gld
8.30 --configure_extra_includes=paths
8.31 --configure_extra_libraries=paths
8.33 --configure_gcc=path
8.34 --configure_gcc_version=version
8.35 --configure_gld=path
8.178 --translate_g++
8.92 --gnu_defaults
8.75 --execstack, --no_execstack
8.36 --configure_sysroot=path
8.8 --arm_linux
Related information
--search_dynamic_libraries, --no_search_dynamic_libraries linker option
--library=name linker option
--arm_linux linker option
Non-ConfidentialPDF file icon PDF versionARM DUI0472J
Copyright © 2010-2013 ARM. All rights reserved.