This is at least needed for DragonFly, so perhaps also for *BSD.
Otherwise static variables won't get a proper offset when linking (with gnu ld). -- Serve - BSD +++ RENT this banner advert +++ ASCII Ribbon /"\ Work - Mac +++ space for low €€€ NOW!1 +++ Campaign \ / Party Enjoy Relax | http://dragonflybsd.org Against HTML \ Dude 2c 2 the max ! http://golden-apple.biz Mail + News / \
# HG changeset patch # User Simon 'corecode' Schubert <[EMAIL PROTECTED]> # Date 1188155539 -7200 # Node ID a9fb98828aeb0423ca941a0f8604f6d968f5fc1a # Parent 4c38950741702a6cc4f82920001d058a40887cd0 Do not put static variables into a common section. diff -r 4c3895074170 -r a9fb98828aeb tcc.c --- a/tcc.c Sat Aug 18 01:13:00 2007 -0500 +++ b/tcc.c Sun Aug 26 21:12:19 2007 +0200 @@ -8059,7 +8059,7 @@ static void decl_initializer_alloc(CType if (!sec) { if (has_init) sec = data_section; - else if (tcc_state->nocommon) + else if ((type->t & VT_STATIC) || tcc_state->nocommon) sec = bss_section; } if (sec) {
_______________________________________________ Tinycc-devel mailing list Tinycc-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/tinycc-devel