Changeset 2eadda9 in mainline for uspace/lib/c/generic/private/libc.h


Ignore:
Timestamp:
2018-07-11T17:45:30Z (6 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
99d3123
Parents:
c2c4127
git-author:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-07-11 17:08:12)
git-committer:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-07-11 17:45:30)
Message:

Remove undefined references to main program from shared libc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/private/libc.h

    rc2c4127 r2eadda9  
    3636#define LIBC_PRIVATE_LIBC_H_
    3737
     38#include <types/common.h>
     39
     40/* Type of the main C function. */
     41typedef int (*main_fn_t)(int, char **);
     42
    3843/**
    3944 * Used for C++ constructors/destructors
     
    4348typedef void (*fini_array_entry_t)();
    4449
    45 extern init_array_entry_t __init_array_start[];
    46 extern init_array_entry_t __init_array_end[];
    47 extern fini_array_entry_t __fini_array_start[];
    48 extern fini_array_entry_t __fini_array_end[];
     50typedef struct {
     51        main_fn_t main;
     52        const void *elfstart;
     53        const void *end;
     54        init_array_entry_t *preinit_array;
     55        int preinit_array_len;
     56        init_array_entry_t *init_array;
     57        int init_array_len;
     58        fini_array_entry_t *fini_array;
     59        int fini_array_len;
     60} progsymbols_t;
    4961
    50 extern unsigned char _end[];
     62extern progsymbols_t __progsymbols;
    5163extern void __libc_main(void *) __attribute__((noreturn));
    5264extern void __libc_exit(int) __attribute__((noreturn));
    5365extern void __libc_abort(void) __attribute__((noreturn));
    54 extern int main(int, char *[]);
    5566
    5667#endif
Note: See TracChangeset for help on using the changeset viewer.