Talk:Data segment

Latest comment: 5 years ago by Hpfeil in topic Unnamed section

Unnamed section

edit

I'm not 100% sure about the Rodata thing, and from all the extensive research I've done, there seems to be a lot of differences between the various systems. Can anyone find a better/more general way of saying that? --EatMyShortz 14:30, 16 Apr 2005 (UTC)


.section
.rodata      ; a read-only data segment containing static data, for example a string
.string "Hello World!"  ; a static string


Hpfeil (talk) 00:48, 23 July 2019 (UTC)Reply

Picture Needed

edit

Can anyone draw a picture to explain the difference between .bss/.data/.code segment? Thanks in adavance! Visame (talk) 06:29, 8 June 2008 (UTC)Reply

This article is heavily broken

edit
  • It starts out with "In the PC Architecture", but segments / sections are defined by the platform (Linux / BSD / Windows) and not by the architecture (x86 PC / PowerPC / ARM).
  • The article only has one reference, which is some HOWTO on embedded programming. It would be very easy to find a much better reference, such as the ELF specification or an operating systems / compilers book.
  • The article's only reference contradicts the information in the article. Search for the word "segment" in the reference, you won't find it. The reference mentions several *sections* however, such as the .data and .rodata sections.
  • The article has a tone that is too informal for an Encyclopedia.
  • The article inconsistently refers to the data segment as a "section" or a "segment". The two terms have distinct technical meanings on ELF: a segment is a collection of sections loaded as a group.

63.227.219.18 (talk) 05:32, 17 June 2011 (UTC)Reply

I second that ! also to add to the list :

Assembly vs C problem

edit

Could someone please define more precise what in the article text that is concidered wrong or doubtful. It seems to me that some assembly programmer and an other c programmer cannot agree. It must be remembered that the artcle is about memory as such, not PC or PC-memory. 83.249.42.164 (talk) 22:27, 30 July 2012 (UTC)Reply

Incorrect information based upon actual testing with C program

edit

I have tested on Linux (x86) with gcc and MacOS (x64) with gcc/clang and proved the information of this article wrong. From lower memory address to higher memory address, initialized variable should come before uninitialized variables. That is, the relative segment sequence should be: code -> constants(string literals) -> initialized data -> uninitialized data -> heap -> stack.

  • The order is largely irrelevant and down to the operating system and compiler in use. In GCC+Linux/x86 it may be different to in .NET/Windows, or Fortran on VAX/VMS. There is no standard that every operating system and language adheres to. You cannot pick one system at random and say "Everything else is wrong because I say this is right" - there is no right and wrong, only "how it is done in XXX system using YYY language".

Majenko (talk) 11:16, 30 December 2015 (UTC)Reply

BraveGNU.org

edit

Why is BraveGNU.org being listed under References at all? --johayek (talk) 12:02, 24 February 2016 (UTC)Reply