Need support for __attribute__((visibility("hidden"))) for variables and functions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Arm Embedded Toolchain |
New
|
Undecided
|
Unassigned |
Bug Description
Applicable to ARM GCC compiler downloadable along with the Atmel Studio 7.0 available on the link below:
https:/
Customer is writing secure application and needs to adhere to the KCMVP (Korea Cryptographic Module Validation Program) guidelines.
They have a certain requirement to make some of the cryptographic objects, API calls as hidden and want to use the _attribute_
However, the attribute isn't supported by the ARM GCC compiler.
Though the toolchain accepts the attribute without a build error, it don't hide the objects in the map file or the elf file.
Examples of use:
void __attribute_
void __attribute_
{
printf("visibility Test !!!!!!!!!!!!!! \r\n");
}
The symbols "visibility_
This attribute affects the object's visibility of the ELF symbols.
Visibility can be of following types:
default - The assumed visibility of symbols can be changed by other options. Default visibility overrides such changes. Default visibility corresponds toexternal linkage.
hidden - The symbol is not placed into the dynamic symbol table, so no other executable or shared library can directly reference it. Indirect referencesare possible using function pointers.
internal - Unless otherwise specified by the processor-specific Application Binary Interface (psABI), internal visibility means that the function is nevercalled from another module.
protected - The symbol is placed into the dynamic symbol table, but references within the defining module bind to the local symbol. That is, thesymbol cannot be overridden by another module.
This feature is supported by the Keil compiler:
http://
http://
Need support for __attribute_
Ich bin bis 16.11. nicht im Haus und kann Ihre Nachricht daher leider nicht bearbeiten. In dringenden Fällen wenden Sie sich bitte an <email address hidden> bzw. für technische Fragen an <email address hidden>.
I am out of office until November 16th and won't be able to read your message. In urgent cases, please refer to <email address hidden> or for technical questions to <email address hidden>.
Mit freundlichen Grüßen / Best regards
Steffen Wolfer
--
Dipl.-Inform. Steffen Wolfer
Software Engineer Embedded Systems
WEISS ROBOTICS GmbH & Co. KG Käferle- Str. 8
Karl-Heinrich-
D-71640 Ludwigsburg, Germany
Phone: +49 7141 94702-22 www.weiss- robotics. com
Fax: +49 7141 94702-99
http://
Sitz der Gesellschaft: Ludwigsburg
Registergericht Stuttgart, HRA725006
Pers. haftende Gesellschafterin:
Weiss Robotics Verwaltungs-GmbH, Sitz Ludwigsburg
Registergericht Stuttgart, HRB73310
Geschäftsführer: Dr. Karsten Weiß
Public bug reported:
Applicable to ARM GCC compiler downloadable along with the Atmel Studio 7.0 available on the link below: /www.microchip. com/mplab/ avr-support/ atmel-studio- 7
https:/
Customer is writing secure application and needs to adhere to the KCMVP (Korea Cryptographic Module Validation Program) guidelines. ((visibility( "hidden" ))) for functions and variables.
They have a certain requirement to make some of the cryptographic objects, API calls as hidden and want to use the _attribute_
However, the attribute isn't supported by the ARM GCC compiler.
Though the toolchain accepts the attribute without a build error, it don't hide the objects in the map file or the elf file.
Examples of use: _((visibility( "hidden" ))) visibility_ hidden_ var;
void __attribute_
void __attribute_ _((visibility( "hidden" ))) _visibility_ test_lib( )
{
printf("visibility Test !!!!!!!!!!!!!! \r\n");
}
The symbols "visibility_ hidden_ var" and "_visibility_ test_lib" should not show in the elf file (when read with the readelf utility) and the map file.
This attribute affects the object's visibility of the ELF symbols.
Visibility can be of following types:
default - The assumed visibility of symbols can be changed by other
options. Default visibility overrides such changes. Default visibility
corresponds toexternal linkage.
hidden - The symbol is not placed into the dynamic symbol table, so no
other executable or shared library can directly reference it. Indirect
referencesare possible using function pointers.
internal - Unless otherwise specified by the processor-specific
Application Binary Interface (psABI), internal visibility means that the
function is nevercalled from another module.
protected - The symbol is placed into the dynamic symbol table, but
references within the defining module bind to the local symbol. That is,
thesymbol cannot be overridden by another module.
This feature is supported by the Keil compiler: www.keil. com/support/ man/docs/ armcc/armcc_ chr135912498351 1.htm www.keil. com/support/ man/docs/ armcc/armcc_ chr135912497862 8.htm
http://
http://
Need support for __attribute_ _((visibility( "hidden" ))) for variables and
functions in ARM GCC compiler
** Affects: gcc-arm-embedded
Importance: Undecided
Status: Ne...