This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ELF octets_per_byte


I am in the process of trying to port binutils to a new architecture,
the ZipCPU.  (You can find a description of it here:,zipcpu)  One unique +ACI-feature+ACI of this
processor is that the size of the minimum addressable unit is 32-bits.

While binutils has support for an +ACI-octets+AF8-per+AF8-byte+ACI value other than
one, this feature does not appear to be fully supported.  Indeed, the
+ACI-bfd/elflink.c+ACI file contains several +ACI-FIXME+ACI lines regarding the
insufficiency of the current support.

All of these can be easily fixed, and I would like to propose a patch
(or series of patches) to do this.  The first part of this process will
need to be identifying which ELF variables/values are +ACI-bytes+ACI (units of
the targets address space), and which are +ACI-octets+ACI (8-bit values, units
of the more commonly used address space).  Sadly, these units are not
consistent with the meaning of +ACI-bytes+ACI found within the ELF
specification, nor can they be since the ELF specification does not
acknowledge the potential difference between these two.

For the purpose of beginning a discussion, and based upon a reading of
the ELF specification, I propose the following values be in units of

section size
section header size
section header offset

For the most part, these values +ACo-must+ACo be in octets, or it will be
impossible to read and process an ELF file.

I also propose that the following values are in units of target address
space +ACI-bytes+ACI:

ELF header +ACI-entry+ACI address
section header address
symbol value
symbol size
relocation offset
relocation addend

Using this definition, applications of +ACI-bfd+AF8-octets+AF8-per+AF8-byte()+ACI can be
applied to convert units from one to the other as necessary.

Comments?  Are there any values that I have missed?



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]