https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63234
baoshan <pangbw at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|4.9.1 |4.9.0
--- Comment #2 from baoshan <pangbw at gmail dot com> ---
1. configure & build gcc
$ PATH_TO_SRC/configure --enable-languages=c --target=arm-linux-eabi
--enable-tls
$ make
2. cat m.c
typedef struct _GHashTable GHashTable;
typedef struct _DNSCacheEntry DNSCacheEntry;
typedef struct _DNSCacheKey DNSCacheKey;
struct _DNSCacheKey
{
};
struct _DNSCacheEntry
{
DNSCacheEntry *prev, *next;
DNSCacheKey key;
};
struct __tls_variables
{
GHashTable *cache;
DNSCacheEntry persist_first;
DNSCacheEntry persist_last;
}
;
static __thread struct __tls_variables __tls;
dns_cache_cleanup_persistent_hosts (void)
{
while ((__tls.persist_first).next != &(__tls.persist_last))
{
g_hash_table_remove ((__tls.cache), &(__tls.persist_first).next->key);
}
}
3. cc1 -O1 -fPIC m.c -o m.s
4. cat m.s
In the output you can see there is one line at the end of file:
.word .LANCHOR0(tlsldm) + (. - .LPIC3 - 8)
But the lable .LPIC3 is not existed in the file.