|Anonymous | Login | Signup for a new account||2020-02-28 04:01 CET|
|Main | My View | View Issues|
|Viewing Issue Simple Details|
|ID||Category||Severity||Reproducibility||Date Submitted||Last Update|
|0000124||[libFirm] other||minor||N/A||2013-09-19 23:20||2016-01-03 03:28|
|Summary||0000124: loadtime constants in position independent code|
The current code in cparser/libfirm is written with the assumption that we have compiletime constants and linktime constants. Meaning values that have a known constant value at compilation time (example "42, sizeof(int), ...) or at link time (example addressed of strings, functions, variables).
With position independent code a new concept is needed apparently which I will call loadtime constant here. It seems that stuff we regard as linktime constants, are suddenly loadtime constants which need special handling. This manifests itself in the following code:
const int x = 42; const int *p = &x;
The variable p cannot be placed in the rodata segment anymore, as the address is dependent on where the code is mapped to which is not known at linktime for position independent code (and probably also not statically fixed in modern hacking prevention techniques).
(This is mainly a note for later, as currently PIC only works on Mac systems anyway, we should first add PIC on elf/linux support anyway).
|Tags||No tags attached.|
|Fixed in aba0611e4da95653d446873e33f1f80599a7e356|
|2013-09-19 23:20||Matze||New Issue|
|2014-09-29 10:38||Matze||Status||new => confirmed|
|2015-09-07 05:55||Matze||Note Added: 0000229|
|2015-09-07 05:55||Matze||Assigned To||=> Matze|
|2015-09-07 05:55||Matze||Status||confirmed => resolved|
|2015-09-07 05:55||Matze||Resolution||open => fixed|
|2016-01-03 03:28||Matze||Status||resolved => closed|
|Mantis 1.1.5[^] Copyright © 2000 - 2008 Mantis Group|