[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/20159] New: Dynamic Linking Change for Shared Libraries (1.24 to
From: |
paul.braman at nielsen dot com |
Subject: |
[Bug ld/20159] New: Dynamic Linking Change for Shared Libraries (1.24 to 1.26) |
Date: |
Fri, 27 May 2016 15:41:33 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=20159
Bug ID: 20159
Summary: Dynamic Linking Change for Shared Libraries (1.24 to
1.26)
Product: binutils
Version: 2.26
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: paul.braman at nielsen dot com
Target Milestone: ---
I get different results in Ubuntu 14.04 (GCC 4.8.4/GNU ld 2.24) and Ubuntu
16.04 (GCC 5.3.1/GNU ld 2.26) when building the following test code:
nothing.c:
#include <stdio.h>
#include <time.h>
void nothing( )
{
printf( "%lld\n", (long long)time( NULL ) );
}
something.c:
#include <stdio.h>
#include <time.h>
extern void nothing( void );
int main( )
{
printf( "%lld\n", (long long)time( NULL ) );
nothing( );
return 0;
}
faketime.c:
#include <time.h>
time_t time( time_t * ptr )
{
return 42;
}
... using the commands:
gcc -fPIC -c -o nothing.lo nothing.c
gcc -shared -rdynamic -o libnothing.so nothing.lo
gcc -o something something.c faketime.c -Wl,-rpath=. -L. -lnothing
Ubuntu 14.04 says the answer is "42/42" while Ubuntu 16.04 says the answer is
"42/1464287587" (insert your current Unix timestamp).
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/20159] New: Dynamic Linking Change for Shared Libraries (1.24 to 1.26),
paul.braman at nielsen dot com <=
- [Bug ld/20159] Dynamic Linking Change for Shared Libraries (1.24 to 1.26), amodra at gmail dot com, 2016/05/28
- [Bug ld/20159] Dynamic Linking Change for Shared Libraries (1.24 to 1.26), hjl.tools at gmail dot com, 2016/05/29
- [Bug ld/20159] Dynamic Linking Change for Shared Libraries (1.24 to 1.26), amodra at gmail dot com, 2016/05/29
- [Bug ld/20159] Dynamic Linking Change for Shared Libraries (1.24 to 1.26), hjl.tools at gmail dot com, 2016/05/29
- [Bug ld/20159] Dynamic Linking Change for Shared Libraries (1.24 to 1.26), amodra at gmail dot com, 2016/05/29
- [Bug ld/20159] Dynamic Linking Change for Shared Libraries (1.24 to 1.26), hjl.tools at gmail dot com, 2016/05/29
- [Bug ld/20159] Dynamic Linking Change for Shared Libraries (1.24 to 1.26), amodra at gmail dot com, 2016/05/30
- [Bug ld/20159] Dynamic Linking Change for Shared Libraries (1.24 to 1.26), amodra at gmail dot com, 2016/05/30
- [Bug ld/20159] Dynamic Linking Change for Shared Libraries (1.24 to 1.26), hjl.tools at gmail dot com, 2016/05/31
- [Bug ld/20159] Dynamic Linking Change for Shared Libraries (1.24 to 1.26), paul.braman at nielsen dot com, 2016/05/31