{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":48087712,"defaultBranch":"main","name":"elf2flt","ownerLogin":"uclinux-dev","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2015-12-16T04:39:06.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/16241952?v=4","public":true,"private":false,"isOrgOwned":true},"refInfo":{"name":"","listCacheKey":"v0:1716775926.0","currentOid":""},"activityList":{"items":[{"before":"eead8d5e9f3911243182311f16178c25c6ea03c4","after":"13dbbb85982c18f0a1f356a97eb315a14361f389","ref":"refs/heads/main","pushedAt":"2024-08-22T12:14:11.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"gregungerer","name":"Greg Ungerer","path":"/gregungerer","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1109224?s=80&v=4"},"commit":{"message":"riscv64: handle R_RISCV_SET_ULEB128/R_RISCV_SUB_ULEB128\n\nFor C++ applications or libraries like gdbserver or gmp\nwe need to handle these relocations.\n\nSigned-off-by: Waldemar Brodkorb ","shortMessageHtmlLink":"riscv64: handle R_RISCV_SET_ULEB128/R_RISCV_SUB_ULEB128"}},{"before":"44e34cb50f2d25848a85a59adbc561eee66278e8","after":"eead8d5e9f3911243182311f16178c25c6ea03c4","ref":"refs/heads/main","pushedAt":"2024-03-26T13:30:55.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"gregungerer","name":"Greg Ungerer","path":"/gregungerer","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1109224?s=80&v=4"},"commit":{"message":"fix alignment for new-style ctors when using riscv64\n\nRecently uClibc-ng enabled UCLIBC_CTOR_DTOR for riscv64, so\nthat f.e. C++ applications are running fine. As a side effect\nthis breaks noMMU support. The problem is the alignment for\nthe ctors in elf2flt. This patch fixes it.\n\nTested with Qemu for ARM, M68k and Xtensa with no regressions.","shortMessageHtmlLink":"fix alignment for new-style ctors when using riscv64"}},{"before":"679c94adf27c5cbc64a495554e6e807ac42422d3","after":"44e34cb50f2d25848a85a59adbc561eee66278e8","ref":"refs/heads/main","pushedAt":"2023-12-22T01:20:20.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"vapier","name":"Mike Frysinger","path":"/vapier","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/176950?s=80&v=4"},"commit":{"message":"elf2flt: add RISC-V 32-bit support\n\nAllow elf2flt to work with RISC-V 32-bit targets. With these changes, the\nuclibc toolchain and busybox can work fine for rv32 no MMU systems with\nno noticable problem.\n\nSigned-off-by: Charles Lohr \n[Rebased onto latest tree for upstreaming]\nSigned-off-by: Jesse Taube \n[Add more ELF relco types and edit commit message]\nSigned-off-by: Yimin Gu ","shortMessageHtmlLink":"elf2flt: add RISC-V 32-bit support"}},{"before":"26dfb54a59c8c0106418a0c46ccb4288d9e066fd","after":"679c94adf27c5cbc64a495554e6e807ac42422d3","ref":"refs/heads/main","pushedAt":"2023-09-12T00:09:49.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"gregungerer","name":"Greg Ungerer","path":"/gregungerer","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1109224?s=80&v=4"},"commit":{"message":"elf2flt.ld: reinstate 32 byte alignment for .data section\n\nCommit 8a3e74446fe7 (\"allow to build arm flat binaries\") moved the\nfollowing commands:\n\t. = ALIGN(0x20) ;\n\t@SYMBOL_PREFIX@_etext = . ;\nfrom the .text section to the top level in the SECTIONS node.\n\nThe .text output section is being directed to a memory region using the\n\"> flatmem :text\" output section attribute. Commands in the top level in\nthe SECTIONS node are not.\n\nThis means that the ALIGN() command is no longer being appended to the\nflatmem memory region, it will simply update the Location Counter.\n\nThe heuristic for placing an output section is described here:\nhttps://sourceware.org/binutils/docs-2.38/ld.html#Output-Section-Address\n\n\"If an output memory region is set for the section then it is added to this\nregion and its address will be the next free address in that region.\"\n\nSince the .data section is being directed to the same memory region as the\n.text section, this means that the Location Counter is not used when\nassigning an address to the .data output section, it will simply use the\nnext free address.\n\nNo longer directing these commands to the flatmem memory region means that\nthe .data output section is no longer aligned to a 32 byte boundary.\n\nBefore commit 8a3e74446fe7 (\"allow to build arm flat binaries\"):\n$ readelf -S busybox_unstripped.gdb | grep data\n [ 3] .data PROGBITS 0000000000035ac0 00036ac0\n$ readelf -s busybox_unstripped.gdb | grep _etext\n 19286: 0000000000035ac0 0 NOTYPE GLOBAL DEFAULT 1 _etext\n\nAfter commit 8a3e74446fe7 (\"allow to build arm flat binaries\"):\n$ readelf -S busybox_unstripped.gdb | grep data\n [ 3] .data PROGBITS 0000000000035ab0 00036ab0\n$ readelf -s busybox_unstripped.gdb | grep _etext\n 19287: 0000000000035ac0 0 NOTYPE GLOBAL DEFAULT 3 _etext\n\nThe .data output section has to be aligned to a 32 byte boundary, see the\nFLAT_DATA_ALIGN 0x20 macro and its usage in fs/binfmt_flat.c:\nhttps://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/binfmt_flat.c?h=v5.17#n59\n\nReadd an explicit ALIGN attribute on the .data section itself, since the\nlinker will obey this attribute regardless if being directed to a memory\nregion or not. Also remove the ALIGN() command before the .data section,\nsince this misleads the reader to think that the Location Counter is used\nwhen assigning an address to the .data section, when it actually is not.\n\nSigned-off-by: Niklas Cassel \n\nAs Niklas points out this patch is no longer strictly necessary.\n\nThat being said, having the ALIGN attribute on the output of the data\nsection declaration itself is safer, as it means that the output section\nwill be aligned regardless if it is redirected or not.\n\nSigned-off-by: Greg Ungerer ","shortMessageHtmlLink":"elf2flt.ld: reinstate 32 byte alignment for .data section"}},{"before":"c5c8043c4d79a1cdd9bd359a542e6fdf3b04d5a1","after":"26dfb54a59c8c0106418a0c46ccb4288d9e066fd","ref":"refs/heads/main","pushedAt":"2023-09-06T11:32:44.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"gregungerer","name":"Greg Ungerer","path":"/gregungerer","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1109224?s=80&v=4"},"commit":{"message":"elf2flt: xtensa: fix text relocations\n\nThe commit 5e08f1968316 (\"Don't always update text in !pic_with_got case\")\nchanged good_32bit_resolved_reloc to not do endianness swapping for\nrelocated entries in the text segment. This broke little-endian xtensa\nFLAT images which after this change fail to start with the following\nmessage:\n\n binfmt_flat: reloc outside program 0x24c80100 (0 - 0x6e430/0x56a20)\n\nFix it by preserving 'update_text' when building for xtensa.\n\nThis fix is a modified version of an original fix by Max Filippov\n. This commit message was his, though his\nSigned-off-by has been dropped due to it being a different fix.\n\nThe relocation code is used \"as-is\" but a different entry path\ninto it ensures that \"update_text\" is not cleared for Xtensa.\n\nFixes: 5e08f1968316 (\"Don't always update text in !pic_with_got case\")\nReported-by: Niklas Cassel \nSigned-off-by: Greg Ungerer ","shortMessageHtmlLink":"elf2flt: xtensa: fix text relocations"}},{"before":"e6ccd3ae814b4661ea66d544b4998fda522365d0","after":"c5c8043c4d79a1cdd9bd359a542e6fdf3b04d5a1","ref":"refs/heads/main","pushedAt":"2023-09-06T11:31:43.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"gregungerer","name":"Greg Ungerer","path":"/gregungerer","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1109224?s=80&v=4"},"commit":{"message":"elf2flt: add riscv 64-bits support\n\nAdd support for riscv 64bits ISA by defining the relocation types\nR_RISCV_32_PCREL, R_RISCV_ADD32, R_RISCV_SUB32, R_RISCV_32 and\nR_RISCV_64. riscv64 support also needs the __global_pointer$ symbol to\nbe defined right after the relocation tables in the data section. To\ndefine this symbol, the \"RISCV_GP\" line prefix is added. The \"RISCV_GP\"\nstring is removed if the target CPU type is riscv64 and the definition\nline is dropped for other CPU types.\n\nWith these changes, buildroot and busybox build and run on riscv NOMMU\nsystems with Linux kernel including patch 6045ab5fea4c\n(\"binfmt_flat: do not stop relocating GOT entries prematurely on riscv\")\nfixing the binfmt_flat loader. Tested on QEMU and Canaan Kendryte K210\nboards.\n\nThis patch is based on earlier work by Christoph Hellwig .\n\nSigned-off-by: Damien Le Moal ","shortMessageHtmlLink":"elf2flt: add riscv 64-bits support"}},{"before":"a934fb42cf599e0c13f3e71fe3b26798c171ad13","after":"e6ccd3ae814b4661ea66d544b4998fda522365d0","ref":"refs/heads/main","pushedAt":"2023-04-25T12:49:22.000Z","pushType":"pr_merge","commitsCount":2,"pusher":{"login":"gregungerer","name":"Greg Ungerer","path":"/gregungerer","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1109224?s=80&v=4"},"commit":{"message":"elf2flt: check for presence of libzstd\n\nBinutils-2.40 introduced support for libzstd compressed bfd sections.\nBy default binutils configure will check for and use the system libzstd\nlibrary if it is present.\n\nNow when compiling elf2flt using the bfd library from a\nbinutils-2.40 and a system present libzstd you will get link errors:\n\n /usr/bin/ld: ..//binutils-2.40/bfd/libbfd.a(compress.o): in function `decompress_contents':\n ../binutils-2.40/bfd/compress.c:517: undefined reference to `ZSTD_decompress'\n /usr/bin/ld: ../binutils-2.40/bfd/compress.c:519: undefined reference to `ZSTD_isError'\n /usr/bin/ld: ../binutils-2.40/bfd/libbfd.a(compress.o): in function `bfd_compress_section_contents':\n ../binutils-2.40/bfd/compress.c:656: undefined reference to `ZSTD_compress'\n /usr/bin/ld: ../binutils-2.40/bfd/compress.c:661: undefined reference to `ZSTD_isError'\n\nAdd a library check to the elf2flt configure for libzstd presence.\nWhen present link using it.\n\nThere is no real problem when linking with -lzstd if compiling with\nbfd libraries from older binutils, it just won't be needed. So there\nis no need to make this check selective on binutils version.\n\nSigned-off-by: Greg Ungerer ","shortMessageHtmlLink":"elf2flt: check for presence of libzstd"}},{"before":"c70b9f20897976ee219c3f5e66187bae5ede310f","after":"a934fb42cf599e0c13f3e71fe3b26798c171ad13","ref":"refs/heads/main","pushedAt":"2023-04-18T14:11:55.000Z","pushType":"pr_merge","commitsCount":3,"pusher":{"login":"gregungerer","name":"Greg Ungerer","path":"/gregungerer","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1109224?s=80&v=4"},"commit":{"message":"elf2flt: force ARM.exidx section into text\n\nFix problem with el2flt core dumping on binutils version 2.33.1 and\nnewer. Previous attempts at fixing this have had a list of subtle\nproblems causing further breakage.\n\nThe problem stems from the .ARM.exidx section being marked as load\nreadonly data, but the elf2flt.ld linker script puts it into the\nflat text section. The elf2flt processing code expects all separate\nELF sections marked as \"data\" to be in the flat data section and\ncalculates sizing and memory based on that. (Note that traditional\nreadonly data is treated as text in the linker script, so it is not\naffected here and is merged into the flat text section with no\nproblems).\n\nThe retaining of separate ELF sections outside of the flat text and\nflat data flatmem sections proper is fragile. Fundamentally the\nflat format only has the two stored sections - text and data. By far\nthe best appraoch is to explicilty put everything into those named\nsections in the elf2flt.ld.\n\nThe .ARM.exidx section must be part of the flat text section - due\nto the relocations that it carries. So move it into the text section\nproper in the elf2flt.ld linker script.\n\nSigned-off-by: Greg Ungerer ","shortMessageHtmlLink":"elf2flt: force ARM.exidx section into text"}},{"before":"e827ca32e4cead195fa91a0ab401791b0ce2d023","after":"c70b9f20897976ee219c3f5e66187bae5ede310f","ref":"refs/heads/main","pushedAt":"2023-04-04T03:58:44.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"gregungerer","name":"Greg Ungerer","path":"/gregungerer","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1109224?s=80&v=4"},"commit":{"message":"elf2flt: handle binutils >= 2.34\n\nThe latest Binutils release (2.34) is not compatible with elf2flt due\nto a change in bfd_section_* macros [1]. The issue has been reported\nto the Binutils mailing list but Alan Modra recommend to bundle\nlibbfd library sources into each projects using it [2]. That's\nbecause the API is not stable over the time without any backward\ncompatibility guaranties.\n\nOn the other hand, the elf2flt tools needs to support modified\nversion of binutils for specific arch/target [3].\n\nAdd two tests in the configure script to detect this API change\nin order to support binutils < 2.34 and binutils >= 2.34.\n\nUpstream status: [4]\n\n[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=fd3619828e94a24a92cddec42cbc0ab33352eeb4\n[2] https://sourceware.org/ml/binutils/2020-02/msg00044.html\n[3] https://github.com/uclinux-dev/elf2flt/issues/14\n[4] https://github.com/uclinux-dev/elf2flt/pull/15\n\nSigned-off-by: Romain Naour \n\nTwo changes made to original patch:\n. $binutils_include_dir used for binutils version check\n. configure script regenerated (run autoconf)\n\nSigned-off-by: Greg Ungerer ","shortMessageHtmlLink":"elf2flt: handle binutils >= 2.34"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"startCursor":"Y3Vyc29yOnYyOpK7MjAyNC0wOC0yMlQxMjoxNDoxMS4wMDAwMDBazwAAAAShP_Ey","endCursor":"Y3Vyc29yOnYyOpK7MjAyMy0wNC0wNFQwMzo1ODo0NC4wMDAwMDBazwAAAAMRhhXZ"}},"title":"Activity ยท uclinux-dev/elf2flt"}