This is the mail archive of the
mailing list for the GCC project.
64-bit PowerPC and small data area?
- From: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- To: GCC <gcc at gcc dot gnu dot org>
- Date: Tue, 25 Jul 2017 14:38:45 +0200
- Subject: 64-bit PowerPC and small data area?
- Authentication-results: sourceware.org; auth=none
in the PowerPC ELFv2 specification
"3.4.2 Use of the Small Data Area
For a data item in the .sdata or .sbss sections, a compiler may generate
short-form one-instruction refer-
ences. In an executable file or shared library, such a reference is
relative to the address of the TOC base
symbol (which can be obtained from r2 if a TOC pointer is initialized).
A compiler that generates code using
the small data area should provide an option to select the maximum size
of objects placed in the small data
area, and a means of disabling any use of the small data area. When
generating code for ELF shared
libraries, the small data area should not be used for default-visibility
global objects. This is to satisfy ELF
shared-library symbol interposition rules. That is, an ordinary global
symbol in a shared library may be over-
ridden by a symbol of the same name defined in the executable or another
shared library. Supporting interpo-
sition when using TOC-pointer relative addressing would require text
I tried to generate code using the small data area on a 64-bit PowerPC
GCC, but I was not successful. We have in the GCC sources
/* Return 1 for an operand in small memory on V.4/eabi. */
small_data_operand (rtx op ATTRIBUTE_UNUSED,
machine_mode mode ATTRIBUTE_UNUSED)
if (rs6000_sdata == SDATA_NONE || rs6000_sdata == SDATA_DATA)
if (DEFAULT_ABI != ABI_V4)
So, it looks like the small data stuff is not support for ABI_ELFv2? Are
there main issues with the small data area using ELVv2 or is this simply
not implemented due to a lack of interested?
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : firstname.lastname@example.org
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.