Who is responsible for Newlib/vbcc ?

Have a question about our Software Developer Kit? Ask them here.
phx
Posts: 10
Joined: Sun Jul 17, 2011 7:55 pm

Who is responsible for Newlib/vbcc ?

Post by phx »

I'm receiving bug reports that some dynamically linked Newlib programs, compiled with vbcc, write the following messages into the serial debug log:

Code: Select all

[elf] .sdata 0x7fd55440-0x7fd55440
Projektit:Ohjelmointi/ScoreGen/ScoreGen/ScoreGen (sh_flags 0x02)
      has read-only flag in section header
      but is located in a read-write section of the program header
      (linker (script) error?)
In my opinion the reason for it is that SDK/newlib/lib/startup.o doesn't include an .sdata section, although _SDA_BASE_ is referenced. Which means, when there is no small data in the main program, then vlink is forced to generate a dummy .sdata section to define _SDA_BASE_, as in the following fragment of Newlib's vbcc linker script:

Code: Select all

  .sdata          : {
    _LinkerDB = . + 0x8000;
    _SDA_BASE_ = . + 0x8000;
    *(.sdata .sdata.* .tocd)
  }
Unfortunately this dummy section is read-only, which causes the warning when the dynamic linker links a real read-write .sdata section to it.

It should be fixed in Newlib's startup.o or vbcc.ldscript. But both are not under my control. Can the responsible person please contact me by email to find a solution? Thanks in advance.

blmara
Posts: 63
Joined: Thu Jun 23, 2011 9:03 am

Re: Who is responsible for Newlib/vbcc ?

Post by blmara »

*bump*

Really, are there people developing newlib.library? I have reported this problem to Frank Wille of VBCC. The error message comes up (captured with Sashimi) when starting or even C:Version-ing AmigaOS 4.1 FE version of AmiPDF (v. 1.25):

Code: Select all

[elf] .gcc_except_table 0x57296f14-0x5729a2b4 System:Utilities/AmiPDF/AmiPDF (sh_flags 0x02)
      has read-only flag in section header
      but is located in a read-write section of the program header
      (linker (script) error?)
Here is another example using C:Version with MindSpace2_v.0.06, yes I know it's very early release:

Code: Select all

elf] .hash 0x7fb3b000-0x7fb3b4cc System:SObjs/libgcc.so (sh_flags 0x02)
      has read-only flag in section header
      but is located in a read-write section of the program header
      (linker (script) error?)
[elf] .dynsym 0x7fb3b4cc-0x7fb3bfac System:SObjs/libgcc.so (sh_flags 0x02)
      has read-only flag in section header
      but is located in a read-write section of the program header
      (linker (script) error?)
[elf] .dynstr 0x7fb3bfac-0x7fb3c78a System:SObjs/libgcc.so (sh_flags 0x02)
      has read-only flag in section header
      but is located in a read-write section of the program header
      (linker (script) error?)
[elf] .rela.data 0x7fb3c78c-0x7fb3c7a4 System:SObjs/libgcc.so (sh_flags 0x02)
      has read-only flag in section header
      but is located in a read-write section of the program header
      (linker (script) error?)
[elf] .rela.dyn 0x7fb3c7a4-0x7fb3cb1c System:SObjs/libgcc.so (sh_flags 0x02)
      has read-only flag in section header
      but is located in a read-write section of the program header
      (linker (script) error?)
[elf] .rela.plt 0x7fb3cb1c-0x7fb3cc9c System:SObjs/libgcc.so (sh_flags 0x02)
      has read-only flag in section header
      but is located in a read-write section of the program header
      (linker (script) error?)
DOS] ERROR: During ElfLoadSeg(); Elf32_Error=10; File="work:MindSpace2_v0.06/MindSpace2"
Marko

User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 591
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: Who is responsible for Newlib/vbcc ?

Post by broadblues »

What system are you guys using?

FE or Update 6?

which machine

I don't see these messages on FE: on my x1k nor on my SAM 440

User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1415
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: Who is responsible for Newlib/vbcc ?

Post by tonyw »

I remember that error message from years ago. It was harmless as I recall, just a message to the effect that an elf section was R/W instead of RO, or something like that.

So what's the problem?
cheers
tony

blmara
Posts: 63
Joined: Thu Jun 23, 2011 9:03 am

Re: Who is responsible for Newlib/vbcc ?

Post by blmara »

broadblues wrote:What system are you guys using?

FE or Update 6?

which machine

I don't see these messages on FE: on my x1k nor on my SAM 440
AmigaOS 4.1 FE on a X1000.
I remember that error message from years ago. It was harmless as I recall, just a message to the effect that an elf section was R/W instead of RO, or something like that.

So what's the problem?
Harmless maybe, but showing that there's a bug, somewhere. And cluttering Sashimi output.

Marko

blmara
Posts: 63
Joined: Thu Jun 23, 2011 9:03 am

Re: Who is responsible for Newlib/vbcc ?

Post by blmara »

So, could the newlib maintainer address this problem?

Marko

User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1415
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: Who is responsible for Newlib/vbcc ?

Post by tonyw »

AFAIR, it wasn't a newlib issue, but in adtools. Newlib has not been changed for a couple of years (newlib.library 53.30 (12/02/2014)).

Again IIRC, I think it went away with a later build of adtools/gcc. Are you sure you have the latest SDK?

We don't maintain this stuff and we don't have people to take off more important projects.
cheers
tony

zzd10h
Posts: 546
Joined: Sun Sep 16, 2012 5:40 am
Location: France

Re: Who is responsible for Newlib/vbcc ?

Post by zzd10h »

No problem for me but I have the same output with one of my program, aTunes.

In Sashimi, a lot of :
[elf] .hash 0x7f5cf000-0x7f5cf4cc OS4_FE:SObjs/libgcc.so (sh_flags 0x02)
has read-only flag in section header
but is located in a read-write section of the program header
(linker (script) error?)

Recompiled with current public SDK/FE (the same problem with previous one/4.1.6)
http://apps.amistore.net/zTools
X1000 - AmigaOS 4.1.6 / 4.1 FE

User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1415
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: Who is responsible for Newlib/vbcc ?

Post by tonyw »

I just checked my clean Final Edition partition and I get no such error messages there.

Nor do I on the beta partition with all the latest beta components. I really don't remember how long ago it happened, but I'm pretty sure that it was fixed years ago.
cheers
tony

xenic
Posts: 1164
Joined: Sun Jun 19, 2011 12:06 am

Re: Who is responsible for Newlib/vbcc ?

Post by xenic »

Since VBCC hasn't been included in the OS4 SDK since SDK v53.15 (2009), I'm guessing that VBCC is no longer supported by the OS4 dev team. You should probably switch to GCC.
AmigaOne X1000 with 2GB memory - OS4.1 FE

Post Reply