diff options
| author | seyko <seyko2@gmail.com> | 2016-05-20 15:12:32 +0300 |
|---|---|---|
| committer | seyko <seyko2@gmail.com> | 2016-05-20 15:12:32 +0300 |
| commit | 19a169ceb896f78205bc23b847938c58f14d1dda (patch) | |
| tree | 3bb430b5c22acf6c024749760d522c95c4c92b61 /tccelf.c | |
| parent | 1339d0475954fa2278977562b618d9bab044bc82 (diff) | |
| download | tinycc-19a169ceb896f78205bc23b847938c58f14d1dda.tar.gz tinycc-19a169ceb896f78205bc23b847938c58f14d1dda.tar.bz2 | |
--whole-archive support
A patch is implemented as suggested in tinycc-devel mail list.
From: Reuben Thomas
Date: Thu, 31 Jul 2014 16:52:53 +0100
Subject: [PATCH] Add --{no,}-whole-archive support
I resurrected the patch supplied to the mailing list in 2009
Since --whole-archive is a useful flag to get tcc working with
autotools, and of course in its own right, I suggest you have a look
at the patch and see if it is acceptable. I cannot see any suggestion
that it was actively rejected last time round, just no evidence that
it was ever added.
Diffstat (limited to 'tccelf.c')
| -rw-r--r-- | tccelf.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -3076,6 +3076,7 @@ static int tcc_load_alacarte(TCCState *s1, int fd, int size) if(sym_index) { sym = &((ElfW(Sym) *)symtab_section->data)[sym_index]; if(sym->st_shndx == SHN_UNDEF) { + load_obj: off = get_be32(ar_index + i * 4) + sizeof(ArchiveHeader); ++bound; lseek(fd, off, SEEK_SET); @@ -3085,6 +3086,8 @@ static int tcc_load_alacarte(TCCState *s1, int fd, int size) goto the_end; } } + } else if (s1->whole_archive) { + goto load_obj; } } } while(bound); |
