bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/18452] ld allows overlapping sections


From: cristiangavril_olar at yahoo dot com
Subject: [Bug ld/18452] ld allows overlapping sections
Date: Sun, 27 Mar 2016 06:03:24 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=18452

Cristian Gavril Olar <cristiangavril_olar at yahoo dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cristiangavril_olar at yahoo 
dot c
                   |                            |om

--- Comment #4 from Cristian Gavril Olar <cristiangavril_olar at yahoo dot com> 
---
Created attachment 9132
  --> https://sourceware.org/bugzilla/attachment.cgi?id=9132&action=edit
binutils LD change patch

Like the link in the last comment shows, this behavior is sane because BSS
sections have to be able to overlap between themselves and data sections for
overlay reasons. But as one user of LD who both needs overlaps but at the same
time has been bitten by longish debugging hours because of not realizing that I
had incidentally created unwanted/accidental overlaps I suggest the following
change:
1) Have LD inform by default if there are noload sections overlapping other
sections
2) If someone saw the information, became aware of the overlap and consciously
makes a choice to quiet down that information, provide a LD flag that would
silence that extra verbosity

The attached patch is a suggestion of such a change. Basically, in a default
run, LD would just print information of the sort of:
"legal section overlap of section .text loaded at
[0000000000008010,000000000000801f] overlapping section .bss loaded at
[0000000000008000,000000000000801f]. See
https://sourceware.org/ml/binutils/2009-05/msg00330.html";
And if the user decides that they have become aware and that for their case
this is a legal use, they could silence the information by using a
"--no-check-overlap-noload-sections" flag sent to LD.

The patch is done against binutils 2.24.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]