Skip to content

Commit

Permalink
Merge pull request #5384 from WalterBright/rmNEWSTATICDTOR
Browse files Browse the repository at this point in the history
remove NEWSTATICDTOR
  • Loading branch information
yebblies committed Jan 31, 2016
2 parents 84f6aaf + 2d4b699 commit 22ee44c
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 21 deletions.
2 changes: 0 additions & 2 deletions src/backend/cdef.h
Expand Up @@ -325,8 +325,6 @@ typedef long double longdouble;
// 2: new style
#define NTEXCEPTIONS 2

#define NEWSTATICDTOR 1 // support new style static destructors

// For Shared Code Base
#if _WINDLL
#define dbg_printf dll_printf
Expand Down
3 changes: 0 additions & 3 deletions src/backend/cgobj.c
Expand Up @@ -1594,7 +1594,6 @@ void Obj::segment_group(targ_size_t codesize,targ_size_t datasize,
#endif
}

//#if NEWSTATICDTOR

/**************************************
* Symbol is the function that calls the static constructors.
Expand Down Expand Up @@ -1676,7 +1675,6 @@ void Obj::staticdtor(Symbol *s)
assert(0);
}

//#else

/***************************************
* Stuff pointer to function in its own segment.
Expand Down Expand Up @@ -1737,7 +1735,6 @@ void Obj::funcptr(Symbol *s)
obj.lnameidx += 3; // for next time
}

//#endif

/***************************************
* Stuff pointer to function in its own segment.
Expand Down
5 changes: 0 additions & 5 deletions src/backend/elfobj.c
Expand Up @@ -1529,8 +1529,6 @@ void Obj::compiler()
}


//#if NEWSTATICDTOR

/**************************************
* Symbol is the function that calls the static constructors.
* Put a pointer to it into a special segment that the startup code
Expand Down Expand Up @@ -1575,8 +1573,6 @@ void Obj::staticdtor(Symbol *s)
SegData[seg]->SDoffset += sz;
}

//#else

/***************************************
* Stuff pointer to function in its own segment.
* Used for static ctor and dtor lists.
Expand All @@ -1587,7 +1583,6 @@ void Obj::funcptr(Symbol *s)
//dbg_printf("Obj::funcptr(%s) \n",s->Sident);
}

//#endif

/***************************************
* Stuff the following data in a separate segment:
Expand Down
3 changes: 0 additions & 3 deletions src/backend/machobj.c
Expand Up @@ -1515,7 +1515,6 @@ void Obj::compiler()
//dbg_printf("Obj::compiler\n");
}

//#if NEWSTATICDTOR

/**************************************
* Symbol is the function that calls the static constructors.
Expand Down Expand Up @@ -1576,7 +1575,6 @@ void Obj::staticdtor(Symbol *s)
#endif
}

//#else

/***************************************
* Stuff pointer to function in its own segment.
Expand All @@ -1588,7 +1586,6 @@ void Obj::funcptr(Symbol *s)
//dbg_printf("Obj::funcptr(%s) \n",s->Sident);
}

//#endif

/***************************************
* Stuff the following data (instance of struct FuncTable) in a separate segment:
Expand Down
4 changes: 0 additions & 4 deletions src/backend/mscoffobj.c
Expand Up @@ -1246,8 +1246,6 @@ void MsCoffObj::compiler()
//dbg_printf("MsCoffObj::compiler\n");
}

//#if NEWSTATICDTOR

/**************************************
* Symbol is the function that calls the static constructors.
* Put a pointer to it into a special segment that the startup code
Expand Down Expand Up @@ -1307,7 +1305,6 @@ void MsCoffObj::staticdtor(Symbol *s)
#endif
}

//#else

/***************************************
* Stuff pointer to function in its own segment.
Expand All @@ -1319,7 +1316,6 @@ void MsCoffObj::funcptr(Symbol *s)
//dbg_printf("MsCoffObj::funcptr(%s) \n",s->Sident);
}

//#endif

/***************************************
* Stuff the following data (instance of struct FuncTable) in a separate segment:
Expand Down
4 changes: 0 additions & 4 deletions src/backend/out.c
Expand Up @@ -977,11 +977,7 @@ STATIC void writefunc2(symbol *sfunc)

#if SCPP
/* If function is _STIxxxx, add in the auto destructors */
#if NEWSTATICDTOR
if (cpp_stidtors && memcmp("__SI",sfunc->Sident,4) == 0)
#else
if (cpp_stidtors && memcmp("_STI",sfunc->Sident,4) == 0)
#endif
{ list_t el;

assert(startblock->Bnext == NULL);
Expand Down

0 comments on commit 22ee44c

Please sign in to comment.