)) to allow specifying different section
names for different section flags.
Thanks in advance for your feedback!
On Fri, Nov 22, 2019 at 12:09 PM Strager Neds wrote:
>
> Here's a revised version of the patch. This revised version is ready for
> review.
>
> When GCC encounters _
Here's a revised version of the patch. This revised version is ready for review.
When GCC encounters __attribute__((section("foo"))) on a function or
variable declaration, it adds an entry in the symbol table for the
declaration to remember its desired section. The symbol table is
separate from th
When building an executable with LTO, GCC effectively ignores
__attribute__((section)) on C++ inline member functions. Moving such
functions into the .text section seems to be intentional, but I think
ignoring the section attribute is unintentional:
https://gcc.gnu.org/ml/gcc-patches/2010-07/msg00
While fixing some bugs in __attribute__((section)), I found it difficult
to write tests. Make testing easier: introduce the
scan-assembler-symbol-section and scan-symbol-section helpers. See
in-line documentation for details.
Testing:
* Run `make check` on x86_64-linux-gnu with --disable-multilib
Bootstrap-building libstdc++ on macOS Sierra 10.12.6
(x86_64-apple-darwin16.7.0) fails with the following linker error:
Undefined symbols for architecture x86_64:
"__ZSt15__alloc_on_copyISaIcEEvRT_RKS1_", referenced from:
__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6a
Several parts of GCC need to copy a section name from one tree (or
symtab_node) to another. Currently, this is implemented naively:
1. Query the source's section name
2. Hash the section name string
3. Find the section_hash_entry in the symbol table
4. Increment the section_hash_entry's reference
symtab_node::set_section_for_node manages the reference count of
section_hash_entry objects. I plan to add another function which needs
to manage the reference count of these objects. To avoid duplicating
code, factor the existing logic into reusable functions.
This patch should not change behavio
Sometimes, we need to copy a section name from one decl or symtab node
to another. Currently, this is done by getting the source's section
name and setting the destination's section name. For example:
set_decl_section_name (dest, DECL_SECTION_NAME (source));
dest->set_section (source->get_
, 2019 at 3:38 PM Strager Neds wrote:
>
> Aside: This is my first time working in GCC's code base. I probably made
> some mistakes. Please point them out. =]
>
> When GCC encounters __attribute__((section("foo"))) on a function or
> variable declaration, it adds an
Aside: This is my first time working in GCC's code base. I probably made
some mistakes. Please point them out. =]
When GCC encounters __attribute__((section("foo"))) on a function or
variable declaration, it adds an entry in the symbol table for the
declaration to remember its desired section. The
10 matches
Mail list logo