Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
This refactoring focuses primarily on code readability and reuse.
- Use the already defined _bfd_elf_find_property instead of another
raw for-loop.
- Extract _bfd_elf_remove_property out of the function body.
|
|
- Extract _bfd_elf_find_property and _bfd_elf_insert_property from the
function's body to improve the code readability.
- Export _bfd_elf_find_property's symbol as it will be used in a later
commit.
|
|
- remove the definition of the search predicate outside of the for loop.
- change the function's return type to struct to adopt a more functional
coding style.
|
|
The creation of .note.gnu.property section should not be based on the
presence of GNU properties, but rather on whether this section exits
or not.
However, there is one exception to this: PR23900 [1]. Old linkers were
treating .note.gnu.property as a generic note section, so old objects
might contain properties inside .note instead of .note.gnu.property. In
this case, the section won't be detected but the properties are still
parsed. So the absence of the .note.gnu.property section is necessary
but not enough to create the section. The condition of the creation of
the section has also to include the absence of GNU properties.
[1] PR23900: https://sourceware.org/bugzilla/show_bug.cgi?id=23900
|
|
into a new function
|
|
|
|
include/elf/aarch64.h
|
|
- add obj_build_attributes to struct elf_backend_data similarly sframe.
- new function _bfd_elf_write_section_build_attributes encapsulating the
writing of the build attributes section into a function.
|
|
|
|
|
|
|
|
* ecoff.c (_bfd_ecoff_write_armap): Don't use statbuf.st_mtime
if stat call returns non-zero. Use ARMAP_TIME_OFFSET rather
than its expansion.
|
|
BFD_FAKE_SECTION and its sidekick GLOBAL_SYM_INIT don't need to be
cluttering bfd.h, and probably shouldn't be used outside bfd/. To
make them internal to bfd, make the bfd ecoff small common section
declaration global so it can be used instead of a duplicate in
gas/ecoff.c. Oddly this needs to go in bfd/ecofflink.c rather than
bfd/ecoff.c as the former is compiled for all targets needing the
ecoff small common section (some via a call in gas/config/obj-elf.c to
a function in gas/ecoff.c) while the latter is not.
While doing this rename ecoff_scom_section to _bfd_ecoff_scom_section
and remove support for traditional C from GLOBAL_SYM_INIT.
|
|
It only add one new CSR: `srmcfg`.
Ref: https://github.com/riscv/riscv-ssqosid/releases/tag/v1.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The SFrame FDE for the PLT0 entry is of type PCINC, which does does not
make use of the type PCMASK repetition block size. Therefore generate
the FDE with a repetition block size of zero.
bfd/
* elfxx-x86.c (_bfd_x86_elf_create_sframe_plt): Use FDE
repetition block size of zero for PLT0.
Signed-off-by: Jens Remus <jremus@linux.ibm.com>
|
|
|
|
|
|
|
|
|
|
A few lines up we would have already bailed when "baseless && is_pic".
|
|
REX2.M affects what insn we're actually dealing with, so we better check
this to avoid transforming (future) insns we must not touch.
|
|
With us doing the transformation to an immediate operand for MOV and
various ALU insns, there's little reason to then not support the same
conversion for the other two insns which have respective immediate
operand forms. Unfortunately for IMUL (due to the 0F opcode prefix)
there's no suitable relocation, so the pre-APX forms cannot be marked
for relaxation in the assembler.
|
|
H.J. requested this adjustment; I'm unaware of any specific technical
background.
|
|
Just like was done recently for x86-64 (commit 4998f9ea9d35): Even if
the assembler avoids using the relaxable relocation for inapplicable
insns, the relocation type can still appear for other reasons. Be more
thorough in the opcode checking we do, to avoid bogusly altering other
insns.
Furthermore correct an opcode mask (even if with the added condition
that's now fully benign).
|
|
|
|
|
|
|
|
NULL is a possible return from bfd_section_already_linked_table_lookup
if out-of-memory.
PR 32703
* linker.c (_bfd_generic_section_already_linked): Catch
bfd_section_already_linked_table_lookup failure.
* coffgen.c (_bfd_coff_section_already_linked): Likewise.
|
|
Fix another one for aarch64.
|
|
Some of these aren't relevant to the relro bug. Some are. They all
matter if early estimation of section layout needs to be good.
PR ld/32690
* elf32-bfin.c (bfin_adjust_dynamic_symbol),
* elf32-hppa.c (elf32_hppa_late_size_sections),
* elf32-microblaze.c (microblaze_elf_adjust_dynamic_symbol),
* elf32-nds32.c (nds32_elf_adjust_dynamic_symbol),
* elf64-ppc.c (size_global_entry_stubs),
* elflink.c (_bfd_elf_tls_setup),
* elfxx-mips.c (mips_elf_add_la25_intro),
(mips_elf_add_la25_trampoline),
(_bfd_mips_elf_adjust_dynamic_symbol),
* elfxx-x86.c (_bfd_x86_elf_late_size_sections): Use
bfd_link_align_section to ensure correct output section
alignment.
|
|
|
|
I noticed when making the change from "einfo" to "fatal" that the
alignment error in _bfd_elf_link_create_gnu_property_sec lacked a %P,
and then decided that a bfd_set_section_alignment that can't happen
does not merit a separate error message. elfxx-x86.c had copied the
same code, so fix that too. In fact, every bfd_set_section_alignment
call in elfxx-x86.c will always return true absent some future
programming error. This patch makes those that accompany making a
section lose their "failed to align " error and share the "failed to
create" error. Those that are changing alignment of a section created
elsewhere now abort on bfd_set_section_alignment returning false.
|
|
Commit 8d97c1a53f3d claimed to replace all einfo calls using %F with
a call to fatal. It did so only for the ld/ directory. This patch
adds a "fatal" to linker callbacks, and replaces those calls in bfd/
too.
|
|
This introduces a new function which should be used whenever the
linker needs to increase section alignment after mapping input to
output sections.
PR ld/32690
* linker.c (bfd_link_align_section): New function.
* elflink.c (_bfd_elf_adjust_dynamic_copy): Use it.
* bfd-in2.h: Regenerate.
|
|
|
|
|
|
PR 32698
* tekhex.c (find_chunk): Remove unnecessary casts.
(insert_byte): Check and return status from find_chunk.
(move_section_contents): Likewise.
(tekhex_get_section_contents, tekhex_set_arch_mach): Return
status from move_section_contents.
(first_phase): Check and return status from first_phase.
|
|
|
|
|
|
|