From 8ddac116a0e4e8452fe130a25a6aa58198509e34 Mon Sep 17 00:00:00 2001 From: dje Date: Mon, 8 Dec 2003 04:18:44 +0000 Subject: [PATCH] * collect2.c (GCC_OK_SYMBOL): Add support for AIX C_WEAKEXT. (GCC_UNDEF_SYMBOL): Same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74407 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/collect2.c | 30 +++++++++++++++++++++--------- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7d2cb11..b3bffc0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2003-12-07 David Edelsohn + Graham Reed + + * collect2.c (GCC_OK_SYMBOL): Add support for AIX C_WEAKEXT. + (GCC_UNDEF_SYMBOL): Same. + 2003-12-07 Kazu Hirata * final.c (final_scan_insn): Don't use FINAL_PRESCAN_LABEL. diff --git a/gcc/collect2.c b/gcc/collect2.c index 73ef344..0d20b4d 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -2552,7 +2552,7 @@ scan_libraries (const char *prog_name) #ifdef OBJECT_FORMAT_COFF -#if defined(EXTENDED_COFF) +#if defined (EXTENDED_COFF) # define GCC_SYMBOLS(X) (SYMHEADER(X).isymMax + SYMHEADER(X).iextMax) # define GCC_SYMENT SYMR @@ -2565,14 +2565,26 @@ scan_libraries (const char *prog_name) # define GCC_SYMBOLS(X) (HEADER(ldptr).f_nsyms) # define GCC_SYMENT SYMENT -# define GCC_OK_SYMBOL(X) \ - (((X).n_sclass == C_EXT) && \ - ((X).n_scnum > N_UNDEF) && \ - (aix64_flag \ - || (((X).n_type & N_TMASK) == (DT_NON << N_BTSHFT) \ - || ((X).n_type & N_TMASK) == (DT_FCN << N_BTSHFT)))) -# define GCC_UNDEF_SYMBOL(X) \ - (((X).n_sclass == C_EXT) && ((X).n_scnum == N_UNDEF)) +# if defined (C_WEAKEXT) +# define GCC_OK_SYMBOL(X) \ + (((X).n_sclass == C_EXT || (X).n_sclass == C_WEAKEXT) && \ + ((X).n_scnum > N_UNDEF) && \ + (aix64_flag \ + || (((X).n_type & N_TMASK) == (DT_NON << N_BTSHFT) \ + || ((X).n_type & N_TMASK) == (DT_FCN << N_BTSHFT)))) +# define GCC_UNDEF_SYMBOL(X) \ + (((X).n_sclass == C_EXT || (X).n_sclass == C_WEAKEXT) && \ + ((X).n_scnum == N_UNDEF)) +# else +# define GCC_OK_SYMBOL(X) \ + (((X).n_sclass == C_EXT) && \ + ((X).n_scnum > N_UNDEF) && \ + (aix64_flag \ + || (((X).n_type & N_TMASK) == (DT_NON << N_BTSHFT) \ + || ((X).n_type & N_TMASK) == (DT_FCN << N_BTSHFT)))) +# define GCC_UNDEF_SYMBOL(X) \ + (((X).n_sclass == C_EXT) && ((X).n_scnum == N_UNDEF)) +# endif # define GCC_SYMINC(X) ((X).n_numaux+1) # define GCC_SYMZERO(X) 0 -- 2.7.4