Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2011-02

internal assembler, .text,.data,.bss

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Armin Diehl

short question regarding the internal assembler:

with as i can access .text, .data and .bss like:

movl $.data,%eax
movl $.text,%eax
movl $.bss,%eax

this does not seem to work with the internal assembler like: function __getBssStart : longint; assembler; export; [alias:'__getBssStart']; asm
movl $.bss,%eax
ret
end;

any hint on how to do this with the internal asm ?

Thx

---------------- Grüsse Armin Diehl

Reply by email

Florian Klaempfl
to Armin Diehl
Armin Diehl wrote 17 lines
short question regarding the internal assembler: with as i can access .text, .data and .bss like: movl $.data,%eax movl $.text,%eax movl $.bss,%eax this does not seem to work with the internal assembler like: function __getBssStart : longint; assembler; export; [alias:'__getBssStart']; asm movl $.bss,%eax ret end; any hint on how to do this with the internal asm ?
sdata : ptruint; external name '__data_start__';

Then take the address of sdata

Reply by email