Index>Non-x86 architectures > FASMARM: problem with referencing external symbols |
Author | |
Thread |
MazeGen Joined: 06 Oct 2003 Posts: 977 Location: Czechoslovakia | MazeGen When assembling the following code with FASM, the generated ELF object file contains one relocation as expected: readelf --relocs extrn_ref.o: However, similar code assembled with FASMARM generates no relocations and the reference to test_sym seems to be lost: There are no relocations in this file. Am I doing something wrong? |
24 Jun 2020, 13:45 |
revolution When all else fails, read the source Joined: 24 Aug 2004 Posts: 18019 Location: In your JS exploiting you and your system | revolution fasmarm has never officially supported ELF or relocations. The ARM relocations are vastly different from the simpler x86. Sometimes the linker has to rewrite the code to support the external symbol. |
24 Jun 2020, 15:13 |
MazeGen Joined: 06 Oct 2003 Posts: 977 Location: Czechoslovakia | MazeGen The docs say 'The 'format' directive will produce ARM code in all the same formats as the X86 version'. That looks like ELF is supported, even ELF with DWARF is mentioned. What formats are actually officially supported? |
24 Jun 2020, 16:41 |
ProMiNick Joined: 24 Mar 2012 Posts: 625 Location: Russian Federation, Sochi | ProMiNick atleast question should be asked this way argument of ARM instructions COULDN`T BE RELOCATED to 32bit dword, so they should be somewhere near PC as 'dw value'. In ARM test_sym should have same relocation type index as R_386_32 has. If in fasmarm relocations would copy fasm behavior, ARM ELF should be workable. In ARM only 2 instructions thou should avoid are movw movt, relocation of them is painfull process completely different from x86 relocations. But if relocs cutted off from ELF it is bad. |
24 Jun 2020, 20:05 |
revolution When all else fails, read the source Joined: 24 Aug 2004 Posts: 18019 Location: In your JS exploiting you and your system | revolution The docs say 'The 'format' directive will produce ARM code in all the same formats as the X86 version'. That looks like ELF is supported, even ELF with DWARF is mentioned. What formats are actually officially supported? Relocations is on my roadmap. I had started some work on them before my secondment, but they not yet available. |
25 Jun 2020, 09:02 |
ProMiNick Joined: 24 Mar 2012 Posts: 625 Location: Russian Federation, Sochi | ProMiNick revolution, when we could expect continue of thour brilliant work with fasmarm. ARM architecture not died by time, but greatfully evolving. So interest to thour fasmarm would only grow in the future. (Apple start to cancel from x86 to ARM - maybe it would be more global tendention.) |
25 Jun 2020, 21:56 |
revolution When all else fails, read the source Joined: 24 Aug 2004 Posts: 18019 Location: In your JS exploiting you and your system | revolution revolution, when we could expect continue of thour brilliant work with fasmarm. If you can help me to find a route, any route, from anywhere to anywhere else on this map then it might be a start. Travelling now is almost impossible without a direct flight and 14-day quarantine.
| |||||||||
26 Jun 2020, 11:00 |
DimonSoft Joined: 03 Mar 2010 Posts: 924 Location: Belarus | DimonSoft <OffTop>Belarus has recently added somewhat between 10 and 20 countries where you can come from without having 14-day quarantine. Might not help you though, unless you’re willing to change your citizenship.</OffTop> |
26 Jun 2020, 20:45 |
< Last Thread | Next Thread > |
Forum Rules:
|