Changeset 1f2e957 for src


Ignore:
Timestamp:
Jun 16, 2021, 6:17:54 PM (3 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
d269894
Parents:
ed395761
Message:

make section .data attribute for global constructors architecture specific for ARM and x86/x64

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/InitTweak.cc

    red395761 r1f2e957  
    1010// Created On       : Fri May 13 11:26:36 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Dec 13 23:15:52 2019
    13 // Update Count     : 8
     12// Last Modified On : Wed Jun 16 16:40:24 2021
     13// Update Count     : 10
    1414//
    1515
     
    12171217        void addDataSectonAttribute( ObjectDecl * objDecl ) {
    12181218                objDecl->attributes.push_back(new Attribute("section", {
     1219#if defined( __x86_64 ) || defined( __i386 )
    12191220                        new ConstantExpr( Constant::from_string(".data#") ),
     1221#else // defined( __ARM_ARCH )
     1222                        new ConstantExpr( Constant::from_string(".data//") ),
     1223#endif
    12201224                }));
    12211225        }
     
    12231227        void addDataSectionAttribute( ast::ObjectDecl * objDecl ) {
    12241228                objDecl->attributes.push_back(new ast::Attribute("section", {
     1229#if defined( __x86_64 ) || defined( __i386 )
    12251230                        ast::ConstantExpr::from_string(objDecl->location, ".data#"),
     1231#else // defined( __ARM_ARCH )
     1232                        ast::ConstantExpr::from_string(objDecl->location, ".data//"),
     1233#endif
    12261234                }));
    12271235        }
Note: See TracChangeset for help on using the changeset viewer.