Ignore:
Timestamp:
Jul 2, 2026, 5:07:05 PM (3 days ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
7886a92f
Parents:
16d862d
Message:

remove addDataSectionAttribute hack and handle dynamic initialization of const definitions by removing the const after resolution

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/InitTweak.hpp

    r16d862d r13481af0  
    99// Author           : Rob Schluntz
    1010// Created On       : Fri May 13 11:26:36 2016
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Wed Sep 22  9:21:00 2022
    13 // Update Count     : 9
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Thu Jul  2 16:45:44 2026
     13// Update Count     : 12
    1414//
    1515
     
    6969bool isConstExpr( const ast::Init * init );
    7070
    71 /// Modifies objDecl to have:
    72 ///    __attribute__((section (".data#")))
    73 /// which makes gcc put the declared variable in the data section,
    74 /// which is helpful for global constants on newer gcc versions,
    75 /// so that CFA's generated initialization won't segfault when writing it via a const cast.
    76 /// The trailing # is an injected assembly comment, to suppress the "a" in
    77 ///    .section .data,"a"
    78 ///    .section .data#,"a"
    79 /// to avoid assembler warning "ignoring changed section attributes for .data"
    80 void addDataSectionAttribute( ast::ObjectDecl * objDecl );
    81 
    8271class InitExpander final {
    8372public:
Note: See TracChangeset for help on using the changeset viewer.